/sitemap or /sitemap.xml

The answer is 2, but I'm still trying to figure out how option 1 would be possible, as the sitemap's extension needs to be included in the URL...
The sitemap file can be named just 'sitemap' without an extension, or the web server can be configured to serve '/sitemap.xml' when it receives a request for '/sitemap'.
 
Thanks Guys
 
The answer is 2, but I'm still trying to figure out how option 1 would be possible, as the sitemap's extension needs to be included in the URL...
Not necessarily. It could even be html. The server just has to send xml header and output.

As for op's question, I think that it could be anything. Just make sure that the output and response header are correct, in case you are rendering the sitemap dynamically. Should not affect your seo at all.
 
Hi Gogol,

How the server fuctionlity works actually??
Can u pls explain
 
Hi Gogol,

How the server fuctionlity works actually??
Can u pls explain
If you use php, you need e.g. :
Code:
<?php
header ("Content-Type:text/xml");
?>
<your_xml_content>
</your_xml_content>

Other languages would be similar too.

As for having a custom url, you will need htaccess rules but I guess you already know that; since your first option has to be done using htaccess.

Edit: In case you are not sure about htaccess, here's a hint:
Code:
https://stackoverflow.com/a/6593897/1437261
 
Last edited:
Thanks Gogol
 
Back
Top