Yoast SEO
[resolved] [Plugin: WordPress SEO by Yoast] Will Google, et al, find sitemap.xml in ../wp-content/uploads/wpseo (19 posts)

  1. fromtheranks
    Posted 5 years ago #

    I'm switching to WordPress SEO after quite some time with various versions of HeadSpace2 (the latest, 3.6.28 seems to be dead as a viable plugin due to no support since June 2010) and with Google XML Sitemaps (which still works).

    The first obvious change is that I have no control over where sitemap.xml goes. It is now generated into ../wp-content/uploads/wpseo which is a long ways from root where the "old" one was stored.

    Will Google, Yahoo, Bing, etc., find it down under the ../wpseo folder? Or do I have to make a change somewhere?

  2. fromtheranks
    Posted 5 years ago #

    I guess this is a really tough question. ?

    How has everyone else been dealing with this hard coded location:

    Redirects in .htaccess?
    Resetting Google and Yahoo and Bing and ... ?
    Custom tweaking some code so it puts it under root (or wherever)?
    Disabling sitemaps in WordPress SEO and using Google XML Sitemaps?
    Something obvious I missed?

  3. rikmulder
    Posted 5 years ago #

    On my site a query for domain.com/sitemap.xml automaticly redirects to the generated sitemap.xml in the plugin directory. Google Webmaster Tools etc. also have no problem finding and indexing it. Did you try calling that URL from your browser?

  4. fromtheranks
    Posted 5 years ago #


    Thank you for your response. I very much appreciate it.

    I'm doing my upgrade testing locally (as I'm jumping several versions) and if I enter http://localhost/fromtheranks/sitemap.xml it comes back with a page not found error. (I can call it as you suggest on my hosted site but the sitemap.xml file is still under root, for the time being, so that would make sense that it works.)

    Do you have a redirect going on somewhere? Maybe in .htaccess?

    BTW, I am really liking this plugin, other than the hardcoded path.

  5. fromtheranks
    Posted 5 years ago #

    Is anyone else running into the issue with the hardcoded path to the sitemap.xml file (and its compressed version)?

    Acknowledging that it might be right under my nose and I am simply not seeing it, from what I can tell there isn't any easy place in Yoast's code to hack this in. Unfortunately I'm not a whiz at .htaccess yet, so if that's the solution a hint on how to format that would help.

    It seems like there are so many search engines out there looking under root as the first place for the sitemap files that there should be a way to point Yoast's plugin there by default, but I can't figure out how. ???

  6. fromtheranks
    Posted 5 years ago #

    As a non-.htaccess guru, would this get me where I want to go (presuming I enter the proper URL of course)?

    <IfModule mod_alias.c>
    RedirectMatch 301 /sitemap\.xml$ http://example.com/wp-content/uploads/wpseo/sitemap.xml
    RedirectMatch 301 /sitemap\.xml\.gz$ http://example.com/wp-content/uploads/sitemap.xml.gz

    This came from digwp.com (Diggning into WP) <-- not their fault if I'm misinterpreting and/or misusing it. :o)

  7. Joost de Valk
    Plugin Author

    Posted 5 years ago #

    you shouldn't have to do that, the plugin should actually take care of the rewrite by itself, have you tried removing the sitemap.xml and sitemap.xml.gz file from your root directory and letting WP handle it?

  8. bostonstrippers
    Posted 5 years ago #

    Hi Joost, I love the plugin, but I do work for another company and manage their 10 to 12 blogs, with the plugin working
    I re-build sitemap
    and it should be in root/sitemap.xml
    I click it and its not found
    its ending up in
    my tech and I can't figure how why
    any help appreciated
    thank you

  9. Joost de Valk
    Plugin Author

    Posted 5 years ago #

    Are you on Windows hosting? Or what is the reason for the index.php in the URL for posts? It's causing the sitemap to show here:


  10. bostonstrippers
    Posted 5 years ago #

    I will ask the tech, he's in Europe and done for the day.
    He did ask about index.php also, I will have more info tomorrow thanks
    I use all your plugins on my blogs, they are great, and I follow you on twitter, than you Joost.

  11. Joost de Valk
    Plugin Author

    Posted 5 years ago #

    My pleasure :) Glad you like it :)

  12. bostonstrippers
    Posted 5 years ago #

    From my tech

    Morning , yep it's htaccess based. the index.php showing up everywhere, when I write the htaccess so everything goes to planobbq instead of http://www.planobbq I'll do a rerwrite to remove the index.php aswell.seems the php5 is going to bugger alot of people. as alot of olderscripts wont work.

    thanks Joost for helping

  13. Joost de Valk
    Plugin Author

    Posted 5 years ago #

    Thanks a lot, and PHP5 only support will indeed bug some people but they will have to fix it anyway to be able to run WP 3.2 in a few months.

  14. fromtheranks
    Posted 5 years ago #

    I guess (maybe due to the weather or long hours at work) I'm being particularly dense this week. Not sure how to ask this correctly but let me try it this way:

    After installing the plugin when I do a rebuild of the sitemap.xml (and .gz file) it auto puts it in the ../wp-content/uploads/wpseo folder. However.

    When Google, et al come looking for it, how are they going to know it is there, in that specific folder, instead of under root which is where they find it now? Without searching the entire site? Which I don't believe they're prone to do.

    Maybe there is something behind the scenes that WP is doing but other than that possibility, I don't see how the search engines are going to find it, unless I tell them via a redirect. ... What am I missing?

    Thanks Joost for what is, my question aside, proving to be a superb plugin.

  15. bostonstrippers
    Posted 5 years ago #

    @ fromtheranks
    check your permalinks and .htaccess
    that solved our same issue

    My tech says

    it automatically moves it there, if its not showing check root/index.php/sitemap.xml if it shows up there, change your permalinks and allw wp to edit your htaccess

  16. fromtheranks
    Posted 5 years ago #

    Interesting. I've been developing locally (as I'm upgrading across several versions) using IIS so, based on the above comments, that is why I haven't seen this phenomenon. I'm still not entirely sure this makes sense to me but I'll be upgrading my hosted (Apache) site this weekend so I'll test and report back.

    Thanks @bostonstrippers

  17. fromtheranks
    Posted 5 years ago #

    I'll be darned. I don't know exactly how it does it (at least not yet) but after finishing the upgrade to WP3.1.1 on http://www.fromtheranks.com I updated pages and posts to ensure the SEO portion was correct, went to the Google Webmaster tools and ... I'll be darned if Google didn't find the sitemap.xml file without any prompting or redirecting on my part ... even though it was "buried" in the ../wp-content/uploads/wpseo folder.

    Thank you Yoost for a great plugin!

  18. avantime
    Posted 5 years ago #

    @fromtheranks could you please tell me if Google already indexed your sitemap and how long did it took?
    Did you create a robots.txt file? For me, in Webmasters Tools, when using fetch as a googlebot I receive a message that Googlebot is blocked by robots.txt.
    I don't have a real robots.txt created and I allow search engines to crawl my site from Settings/Privacy.

    Thank you!

  19. fromtheranks
    Posted 5 years ago #


    Hi. Sorry for the late response but got tied up at work. No, I did not create a robots.txt file; never had one as far as I know (or a need for one).

    Via Google Webmaster tools, I resubmitted my site on 4/17 after all the changes and it took them a couple of days to scan it (on 4/19). The only problems were a couple of missing/erroneous images. Other than that ...

    As a side-bar, when I clicked on the "See Sitemap" link that link came back right away with a display of my new sitemap.xml file so I was pretty sure then that Google would find it.

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic