: Forward slash on urls in the Sitemap file? At the following page: http://www.google.com/support/webmasters/bin/answer.py?answer=183668#2 the urls given in the Sitemap example don't have a forward slash
At the following page:
www.google.com/support/webmasters/bin/answer.py?answer=183668#2
the urls given in the Sitemap example don't have a forward slash at the end.
But i think i heard somewhere that they should.
In my Sitemap file, should I include a forward slash/ on the end of each url?
Or does it not matter?
More posts by @Sims2060225
1 Comments
Sorted by latest first Latest Oldest Best
The URLs you use in your Sitemap should be the same canonical URLs you use on your site. They should only have a forward slash at the end if your page is the default document within the directory eg. index.html, index.php, etc. But this should also be how you link to the page within your site. The forward slash is simply to avoid any ambiguity, to indicate it is a directory and not a file.
For example, you should not link to the default document in the directory:
www.example.com/path/to/index.html
You should simply show the URL as (with a trailing slash):
www.example.com/path/to/
As mentioned, the trailing slash removes any ambiguity. If you omit the trailing slash, it will probably still work, but it first looks for a file called to before realising it's a directory.
The URLs in the sitemap example at the address given do not have a forward slash at the end because they are linking to specific files.
Incidentally, this relates more to how you link to files within your site - not just the Sitemap.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.