• Resolved dmned

    (@dmned)


    I am using Yoast SEO for my website. The site is not a blog and only uses static pages. Currently the site is very small and simple whilst I learn the different abilities of WordPress and the plugins.

    So, Yoast SEO is creating the sitemaps for my site and I am able to click on the button that displays the primary sitemap “sitemap_index.xml” page with only the “page-sitemap.xml” sitemap listed, as expected. However, when I click on the page-sitemap.xml link I receive a 404 error, page not found.

    I have tried several of the suggestions I have seen on the forum but most of those seem to apply to the inability to load the primary sitemap index page and not necessarily related to the page-sitemap.xml page.

    I am not sure where to go from here.

    https://ww.wp.xz.cn/plugins/wordpress-seo/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support amboutwe

    (@amboutwe)

    Can you load the sitemap through the non-pretty URL (see below)?

    If you can load the non-pretty URL, something on your server is not redirecting this URL to the pretty URL (see below). Please contact your webhost for assistance.

    If you cannot load the non-pretty URL, please try the first two suggestions in this article: My individual sitemap is giving a 404 error, what should I do?

    Non-Pretty URL: http://www.example.com/index.php?sitemap=page
    Pretty URL: http://www.example.com/page-sitemap.xml

    Thread Starter dmned

    (@dmned)

    @amboutwe I tried the non-pretty URL, for my case http://www.caseinc.com/index.php?sitemap=page and that also produces the 404 error.

    I had already tried the first two suggestions in the article you referenced and I tried them again per your recommendation. The 404 error is still produced when attempting to access http://www.caseinc.com/page-sitemap.xml although the primary link does work (http://www.caseinc.com/sitemap_index.xml).

    Under Post Types I only have Pages selected to be in the sitemap and under Taxonomies I have neither Categories nor Tags selected.

    I do believe the server is using Apache and I did once modify the .htaccess file per the article to see if that fixed the problem but, alas, it did not.

    I am having sitemap problems too. Just started happening. I’ve been using Yoast for about a year. Site map worked up until a day or so ago.

    This page contains the following errors:
    error on line 2 at column 6: XML declaration allowed only at the start of the document. Below is a rendering of the page up to the first error.

    Problematic Sitemap URL: https://domain.com/sitemap_index.xml / Diagnostic Report: Content-Type (text/html; charset=UTF-8) indicates an error.

    Actually, I don’t even see the sitemap file being generated in the WP directory.

    Plugin Support amboutwe

    (@amboutwe)

    @dmned That is indeed strange. Does the sitemap load when using a default theme with only Yoast SEO active?

    @DolphinGuy This is not your topic. If you require assistance then, as per the Forum Welcome, please post your own topic.

    Thread Starter dmned

    (@dmned)

    @amboutwe Following your query about only having Yoast active I first checked the page-sitemap.xml with the everything as it has been. The page-sitemap.xml did not load.

    I then deactivated all the plugins but left the Yoast plugin active. I checked the page-sitemap.xml and it loaded, the first time I have seen it load.

    I then reactivated each of the other plugins one-by-one and checked the page-sitemap.xml each time after activating a plugin. Each time it loaded without error.

    I never changed the theme to one of the defaults as it seems systematically working through the plugins has allowed the sitemap function to work properly.

    Finally, I disabled XML Sitemaps in Yoast and checked for the primary sitemap page. Of course it didn’t load since I had disabled the setting in Yoast. I then re-enabled sitemaps in Yoast and did a final check on the primary sitemap and page-sitemap XML pages. Both loaded as they had before when I was deactivating and activating the other plugins.

    So, in summary, the page-sitemap.xml is loading properly and all the plugins I have are currently active.

    Thank you for your assistance. Perhaps we should leave this topic open for a few more days just to make sure everything is still working. I will report back in the middle of the week on how the sitemap function is working.

    Thread Starter dmned

    (@dmned)

    A quick update I didn’t think I would be posting so soon. I checked the sitemaps function and found it had reverted back to the 404 error with regard to the page-sitemap.xml page. So I again deactivated the plugins other than Yoast but this time the page-sitemaps.xml file wasn’t properly created until I disabled and re-enabled XML sitemaps in Yoast.

    This time When I deactivated the plugins I checked sitemaps after each deactivation to see if I could isolate it to one plugin but, as previously mentioned, I had to deactivate all of them and then disabled and re-enabled XML sitemaps in Yoast to restore the functionality.

    Currently I only have three plugins activated to continue testing the sitemaps funciton: Yoast (obviously), Contact Form Maker, and Google Analytics for WordPress. I have two plugins deactivated: Root Relative URLs and WP Super Cache.

    More updates to follow…

    Thread Starter dmned

    (@dmned)

    After more than a day of working properly I researched a little bit about the plugins I had deactivated, namely the Root Relative URLs. I click on the 1-star reviews and the most recent review was thus:

    Brakes [sp] Yoast Sitemap with 404s By coreygravitate, April 8, 2016 for WP 4.4.2
    Amazon has been installing this on its cloud sites by default. It will break your Yoast SEO plugin sitemaps though. If you are getting 404’s on your page and post sitemaps and have this plugin try deactivating it.

    So it seems this is the plugin which conflicted with the Yoast sitemaps function. I plan to activate the WP Super Cache plugin in the coming days to see if it also presents a conflict.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘page-sitemap.xml 404 error’ is closed to new replies.