Stay organized with collections
Save and categorize content based on your preferences.
August 25, 2005
How should you name your Sitemap? What extension should you give it?
The short answer is that you can name your Sitemap anything you want. You can use any extension.
Just submit the URL to us, and we'll go pick it up.
The better answer is a little longer. We recommend that you give your Sitemap an extension that
identifies the file type. For instance, if you create
a simple text file
that lists URLs, we suggest giving that Sitemap a .txt extension.
If you create an XML Sitemap that uses our
Sitemap protocol,
give it an .xml extension. If you compress that file using gzip, give it an
.xml.gz extension.
If you use our Sitemap Generator
to create a Sitemap, you specify the resulting Sitemap name in the config.xml file.
The default name is sitemap.xml.gz. If you keep the .gz extension, the
resulting Sitemap file will be compressed. If you change this name to have an .xml
extension, the resulting file will not be compressed. We suggest you compress the file so that
your webserver will take less of a bandwidth used when we download it.
You can submit the URL of a script that dynamically generates an XML Sitemap when we download it.
That script might have an extension such as .asp or .php (depending on
the script type). The extension of the file isn't a problem, but if your script takes a long time
to run, the delay will look like a server timeout and we'll try again later. If you have trouble
getting this type of Sitemap submitted, make sure your script is responsive. Also ensure that your
webserver doesn't automatically add things (such as HTML headers and footers) to the generated
files, since that would cause the resulting XML file to have parsing errors.
One more thing about naming. You can name your Sitemap anything you want... almost. You can't name
it robots.txt. And if you use a
robots.txt file for your site, make sure
that it doesn't restrict our access to your Sitemap file.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],[],[[["\u003cp\u003eYou can name your Sitemap file anything except \u003ccode\u003erobots.txt\u003c/code\u003e, but it's recommended to use an extension that reflects the file type (e.g., \u003ccode\u003e.xml\u003c/code\u003e for XML Sitemaps, \u003ccode\u003e.txt\u003c/code\u003e for text files).\u003c/p\u003e\n"],["\u003cp\u003eFor compressed Sitemaps, use the \u003ccode\u003e.xml.gz\u003c/code\u003e extension, which is recommended to save bandwidth.\u003c/p\u003e\n"],["\u003cp\u003eEnsure your robots.txt file doesn't block access to your Sitemap.\u003c/p\u003e\n"],["\u003cp\u003eDynamically generated Sitemaps are supported but ensure the script is responsive to avoid timeout issues.\u003c/p\u003e\n"]]],["Sitemaps can be named freely with any extension, but it's recommended to use extensions that reflect the file type (e.g., `.txt` for text files, `.xml` for XML). Compressed XML files should use `.xml.gz`. The default name from the Sitemap Generator is `sitemap.xml.gz`. Dynamic XML Sitemap scripts can use extensions like `.asp` or `.php`. Ensure these scripts are responsive and don't add extra content, which can cause parsing errors. Avoid naming it `robots.txt` and ensure it is not blocked in the robots file.\n"],null,["# What's in a name?\n\nAugust 25, 2005\n\nHow should you name your Sitemap? What extension should you give it?\n\n\nThe short answer is that you can name your Sitemap anything you want. You can use any extension.\nJust submit the URL to us, and we'll go pick it up.\n\n\nThe better answer is a little longer. We recommend that you give your Sitemap an extension that\nidentifies the file type. For instance, if you create\n[a simple text file](/search/docs/crawling-indexing/sitemaps/overview#text_file)\nthat lists URLs, we suggest giving that Sitemap a `.txt` extension.\n\n\nIf you create an XML Sitemap that uses our\n[Sitemap protocol](/search/docs/crawling-indexing/sitemaps/overview),\ngive it an `.xml` extension. If you compress that file using gzip, give it an\n`.xml.gz` extension.\n\n\nIf you use our [Sitemap Generator](/search/docs/crawling-indexing/sitemaps/overview)\nto create a Sitemap, you specify the resulting Sitemap name in the `config.xml` file.\nThe default name is `sitemap.xml.gz`. If you keep the `.gz` extension, the\nresulting Sitemap file will be compressed. If you change this name to have an `.xml`\nextension, the resulting file will not be compressed. We suggest you compress the file so that\nyour webserver will take less of a bandwidth used when we download it.\n\n\nYou can submit the URL of a script that dynamically generates an XML Sitemap when we download it.\nThat script might have an extension such as `.asp` or `.php` (depending on\nthe script type). The extension of the file isn't a problem, but if your script takes a long time\nto run, the delay will look like a server timeout and we'll try again later. If you have trouble\ngetting this type of Sitemap submitted, make sure your script is responsive. Also ensure that your\nwebserver doesn't automatically add things (such as HTML headers and footers) to the generated\nfiles, since that would cause the resulting XML file to have parsing errors.\n\n\nOne more thing about naming. You can name your Sitemap anything you want... almost. You can't name\nit robots.txt. And if you use a\n[robots.txt file](/search/docs/crawling-indexing/robots/intro) for your site, make sure\nthat it doesn't restrict our access to your Sitemap file.\n\nPosted by [Vanessa Fox](https://www.vanessafox.com/)"]]