0

On my webroot, I have a file, say, foo.php that outputs a valid XML Sitemap. In robots.txt, I have something like:

Sitemap: http://SomeDomain.com/foo.php

Will the sitemap be found by Google, etc.?

  • 1
    I would think so. There is one way to find out. Have you tried submitting it via Google's Search Console? – closetnoc Aug 27 '16 at 6:20
  • @closetnoc If you submit it via GSC then Google will undoubtedly "find it" (providing it is indeed a valid XML Sitemap), but isn't part of the question... will it find if it is (only) referenced in robots.txt? (However, you would need to submit it via GSC if you want GSC to report on it. But just because GSC doesn't report on it, doesn't mean it's not found it.) – MrWhite Aug 27 '16 at 15:16
  • @w3dk I read the question as this: Because I used a non-standard file extension, would Google not find, but use my PHP script to generate a script? The one way to know if G would have heart burn or not is to test it. – closetnoc Aug 27 '16 at 16:38
  • @closetnoc True, I did read it that way as well at first but then thought there must be something more the question? Maybe not? – MrWhite Aug 28 '16 at 23:39
  • @w3dk I view this as a try it and see scenario. It would not hurt. Still, I recommend that people submit any sitemap through the Search Console anyway. Same with Bing. Why? Why not! Couldn't hurt. Cheers!! – closetnoc Aug 28 '16 at 23:43
1

A .xml extension is not required, it can even be a GET parameter triggering the sitemap.

See http://www.sitemaps.org/: No specification for a particular file extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.