Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support devnihil

    (@devnihil)

    Can you first confirm that the XML Sitemaps feature is enabled in the pugin In order to enable sitemaps in the Yoast SEO plugin, you would need to perform the following actions:

      ​In WordPress go to SEO>General>Features
      ​Toggle the ‘XML Sitemaps’ option to ‘On’
      ​Click ‘Save Changes’

    If you have confirmed that sitemaps are enabled and you are still receiving a 404 error at sitemap_index.xml, the error can be caused by a number of issues, including the permalinks or rewrite rules. We would first recommend to try resetting the permalink structure in WordPress which can be done by performing the following steps:

      In WordPress, go to Settings>Permalinks
      Clicking ‘Save Changes’ without making any modifications

    ​We also have additional information regarding the sitemap files creating an error here: https://kb.yoast.com/kb/my-sitemap-index-is-giving-a-404-error-what-should-i-do/

    If you continue to receive the error after resetting the permalinks, we would then also suggest adding a set of rewrite rules to your server and we have a guide on adding these for an Apache servers here: https://kb.yoast.com/kb/xml-sitemaps-apache/ and for Nginx servers here: https://kb.yoast.com/kb/xml-sitemaps-nginx/.

    Thread Starter Javier

    (@vaporlibre)

    I did all the steps, but the same thing still happens to me, It doesn’t give me a 404 error, it simply redirects me to my homepage, what can I do?

    • This reply was modified 4 years, 1 month ago by Javier.

    Hi,

    We can see that the redirect from the Yoast sitemaps https://vaporlibre.com/sitemap_index.xml to the homepage is coming from the server. We suggest contacting your host provider and verifying that the server is correctly configured and no rules exist which are resulting in that behavior.

    Thread Starter Javier

    (@vaporlibre)

    I checked the entire server, hired an informatic, I also talked to the administrators of the server and everything is correct, they say it is a plugin problem, reading in the forums I have seen that this happens to many people too.

    Hi,

    We are not sure why the Yoast sitemaps are failing to appear. But it now sounds like a plugin or theme conflict. Can you try and gather as much information for us as possible? Please perform the following:

    1. Make sure you are using the most recent WordPress Core, v5.3.2. If you are not sure what version you have or how to update, your host provider can help. Also, be sure to update your Yoast to v13.2 and update your non-Yoast plugins.

    2. Please Check for conflicts.

    If there is a conflict with a plugin or a theme, you can create a new GitHub issue for our developers. Please report the issue to a third party developer as well.

    If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.

    Thread Starter Javier

    (@vaporlibre)

    I checked all that he told me, nothing works. Previously it worked correctly, it was in an update when it stopped working.
    How do you want me to buy the premium version, if the free one doesn’t work?

    Plugin Support amboutwe

    (@amboutwe)

    Yoast SEO sitemaps can be loaded using two URLs, the pretty permalink one and a non-pretty permalink.

    Pretty Permalink: https://www.example.com/sitemap_index.xml
    Non-Pretty Permalink: https://www.example.com/?sitemap=1

    The pretty permalink redirects to the homepage. Please check any redirect plugins you may have and remove redirects that are causing this redirect.

    The non-pretty permalink returns an error XML declaration allowed only at the start of the document. Multiple blank line appear in the source code of the sitemap and is due to a conflict with something in your setup. Usually, there is an empty space or a blank line before or after the closing PHP opening or closing tag, which shouldn’t be there.

    You can narrow down the exact source of conflict by performing a conflict check. Once you have identified whether your theme or a plugin causes the issue, please contact the developers of that theme or plugin for assistance in finding and removing the whitespace.

    Test this on your development or staging site, if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin allows you to run a conflict check without affecting normal visitors to your site.

    As we can imagine that you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts.

    Saša

    (@stodorovic)

    All URLs which end with ‘xml’ redirect to front page:

    $ curl -i https://vaporlibre.com/sitemapblablablablaxml
    HTTP/1.1 301 Moved Permanently
    Server: nginx
    ...
    X-Powered-By: PHP/7.3.15
    X-Redirect-By: WordPress
    ...
    

    If you can’t find PHP code or a plugin then you can try to use https://github.com/stracker-phil/wp-debug-redirect. It’ll show debug trace in HTTP headers.

    Other issue is white-space:

    $ curl -i https://vaporlibre.com/?sitemap=1
    HTTP/1.1 200 OK
    Server: nginx
    Content-Type: text/xml; charset=UTF-8
    ...
    X-Powered-By: PleskLin
    
    <?xml version="1.0" ...
    

    There are 4 empty lines before the content. You should find them into the code or plugins. I think that the theme isn’t source of the white-space.

    Thread Starter Javier

    (@vaporlibre)

    How can I remove those 4 blanks, I have reviewed all the plugins, and all the files in my root, but nothing.
    The problem is that the document is not created on my server to modify it.

    Saša

    (@stodorovic)

    I still see redirects…

    Yoast SEO generates sitemaps “on the fly” and there aren’t physical XML files. You can’t just open XML file and remove lines.

    Empty lines in PHP files can be located anywhere (even on the end of files). Common places are wp-config.php and functions.php.

    You should try https://yoast.com/help/how-to-check-for-plugin-conflicts/ You should open two tabs (admin dashboard and sitemap) in the browser. At second tab (sitemap) try to force refresh (ctrl-f5) at each activation/deactivation of plugin.

    If you aren’t familiar with this process then you can see video – https://givewp.com/documentation/resources/troubleshoot-wordpress-websites-health-check/

    Thread Starter Javier

    (@vaporlibre)

    I managed to remove all the spaces, now the file is seen correctly.
    But I have another problem, it tells me that the file has html tag.
    And the url doesn’t work:
    https://vaporlibre.com/sitemap.xml
    neither is it
    https://vaporlibre.com/sitemap_index.xml
    In these urls I am redirected to my home page.
    Only this works: https://vaporlibre.com/?sitemap=1
    But google doesn’t want it, it tells me that the sitemaps have html tags.

    Saša

    (@stodorovic)

    You can’t submit last URL because it includes sub-sitemaps which are redirecting to front page. It could be reason why google detect sitemaps as html.

    You should use previous procedure for check conflict to detect from where redirects coming. If you can then upload redirect.php (from previous comment) to plugins directory, activate this plugin and check network tab in browner console. I’m pretty sure that redirects are in WP (based on HTTP headers).

    Thread Starter Javier

    (@vaporlibre)

    I can’t find it, how can I detect the origin of the redirects?

    Saša

    (@stodorovic)

    You can use the plugin https://github.com/stracker-phil/wp-debug-redirect to debug redirects. After activate this plugin, you will find debug stack-trace in HTTP headers. Other way is plugin conflict check.

    Based on current HTTP headers, it seems that sitemaps are redirecting by standard WP functions and I think that you can find it with wp-debug-redirect.

    It’s possible that you can add rewrite rules in .htaccesshttps://yoast.com/help/xml-sitemaps-apache/. It may work because redirects are doing in later phase…

    Plugin Support Jerlyn

    (@jerparx)

    Closed. No further questions.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Yoast Seo, does not generate my SiteMaps’ is closed to new replies.