• Resolved nixiemartyn

    (@nixiemartyn)


    I was using this plugin on two sites and noticed for both that the sitemap did not show up on Google Search Console. Instead, I got an error that the sitemap was unavailable/in html format. This plugin redirects https://mysite.net/sitemap.xml to front page https://mysite.net/ and therefore, the sitemap is hidden by this plugin.

    This means that only the front page and not the rest of the site is therefore indexed by Google and visible on search. No other pages or posts will be visible on a Google search. If this works for you, fine, but it is a major flaw for sites that are bigger than a landing page.

    By deactivating this plugin, the sitemap was visible again and indexable, so not only my front page but all of my pages and post are indexed and found on Google.

    I really like the simplicity of this plugin and hope this redirection of the sitemap can be fixed. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author pipdig

    (@pipdig)

    Hi @nixiemartyn, this may mean there is a problem with your sitemap file as WordPress thinks it does not exist. If you’d like me to take a close look you’re welcome to email more info to support[at]pipdig.zendesk.com. Even though the issue isn’t with this plugin, it may be that there is a simple solution with the sitemap settings.

    Thread Starter nixiemartyn

    (@nixiemartyn)

    Hi pipdig

    I am using The SEO Framework plugin, which is preconfigured. The sitemap location is also added to robots.txt automatically.

    It is possible that using an SEO plugin will confuse WordPress core, but how about whitelisting the URL for the sitemap in your code? The sitemap is such an important feature that whitelisting the URLs really does make practical sense. Most SEO plugins with millions of installations, like Yoast, XML sitemap, and SEO Framework use the same location:

    /sitemap.xml
    /sitemap_index.xml
    Whereas /wp-sitemap.xml is a WordPress standard

    If I turn off your plugin Google Search Console can find the sitemaps just fine, but activating your plugin will redirect to front page?and the sitemap will be unavailable. This issue happened on two sites using The SEO Framework and Redirect 404 to Homepage. The plugin’s sitemap settings are set to default, which is what most users will use.?

    Thanks

    Functionality like this plugin offers should run at template_redirect, at priority 11 or higher, preferably PHP_INT_MAX. The reason is that the template might not be fully determined before that point, so you may not be dealing with a 404 page before that.

    Not all templates are (or should be) registered via WordPress’s template-loader; in our case, you can blame Yoast for that.

    Custom templates like The SEO Framework’s sitemap run exit before other template loaders initialize, so the redirect shouldn’t occur if the constricts detailed in my first paragraph are honored. The same is true for WordPress’s built-in sitemap (which Yoast’s rules also broke), and which also loads at template_redirect.

    When the redirect takes place at template_redirect, you may even be able to delete the Cron/XMLRPC/AJAX and bbPress defence clauses, making for a super-lightweight plugin. I cannot fathom an issue that’d spawn migrating the callback from wp at 10 to template_direct at PHP_INT_MAX.

    @nixiemartyn if you care about SEO, please read https://developers.google.com/search/blog/2011/05/do-404s-hurt-my-site. Particularly, the ‘Q: Tell me more about “soft 404 errors.”‘ part:

    [An example is when] a site redirects any unknown URLs to their home page instead of returning 404 errors. [This] can have negative effects on our understanding and indexing of your site, so we recommend making sure your server returns the proper response codes for nonexistent content.

    404’s are a natural part of any website, and redirecting users from it may lead to a confusing experience. Users understand 404: “Ah, the content is gone/not found, let’s move back or click onward.” — With a forced redirect from any URL, you’re serving the user content they didn’t necessarily anticipate. This can harm the user experience.

    Still, that doesn’t take away the necessity for this plugin, such as on bespoke one-pagers or sites relying on page caching that run on ancient hardware.

    Plugin Author pipdig

    (@pipdig)

    @cybr – Thanks for chiming in with this, that’s very helpful.

    @nixiemartyn – Based on this, we should be able to fix the issue with an update. That will be ready either today/tomorrow. I’ll let you know when it is available if you’d like to give it a try.

    Plugin Author pipdig

    (@pipdig)

    @nixiemartyn – this is now ready. All you need to do is uninstall then re-install the ‘Redirect 404 to Homepage’ plugin and you’ll get those new changes immediately. I’ve tested with SEO Framework and it is working for me.

    Thread Starter nixiemartyn

    (@nixiemartyn)

    Thank you Sybre for the impressive technical input and I’ll make sure to read your link.

    And thank you Pipdig for fixing the issue so urgently.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘This plugin redirects the sitemap to the front page.’ is closed to new replies.