What a site map is and why you need one
A site map is a file that lists every page on your website in a format that search engines can read. It tells Google, Bing, and other search engines where your content lives, how often it changes, and how important each page is relative to others. Without a site map, search engines have to discover your pages by following links — which works, but slowly, especially if your site is new or has pages that aren't linked from your homepage.
There are two types of site maps you'll encounter. An XML site map is the machine-readable version that search engines use; it's not meant for human visitors. An HTML site map is a regular webpage that lists your site's structure in a way people can click through — useful for navigation but not required. Most small websites need only the XML version.
Site maps matter most when you have more than a handful of pages, when you publish content infrequently (so search engines might miss new pages), or when your site structure makes some pages hard to reach by clicking from the homepage. They're free to create and cost nothing to maintain once set up.
Key Takeaways
- An XML site map is a text file that lists your website's pages and tells search engines where to find them.
- You can create a site map manually by writing XML code, using a free online generator, or letting your website platform generate one automatically.
- After creating your site map, you upload it to your website's root directory and submit it to Google Search Console and Bing Webmaster Tools.
- Site maps should include the URL of each page, when it was last updated, and how often it typically changes.
- Once submitted, search engines check your site map regularly, so you don't need to resubmit it every time you add a page.
Creating a site map with a free online generator
The fastest way to create a site map is to use a free generator tool. These tools crawl your website, find all your pages, and output an XML file ready to use. Popular options include XML-Sitemaps.com, Screaming Frog SEO Spider (free version), and SmallSEOTools. The process is nearly identical across all of them: you enter your website's URL, the tool scans every page it can reach, and it generates a file called sitemap.xml.
To use XML-Sitemaps.com: go to the site, paste your domain into the URL field, and click "Start". The tool will scan your pages — this takes a few seconds to a few minutes depending on how many pages you have. Once it finishes, click "read your XML sitemap" and save the file to your computer. The file will be named sitemap.xml by default.
If your site has more than 30,000 pages, most free generators will stop there, because Google's limit for a single site map is 50,000 URLs. If you exceed that, you'll need to create multiple site maps and a site map index file (a file that lists all your site maps). For most websites, this is not a concern.
Creating a site map manually with XML code
If you prefer to write the site map yourself or need fine control over what gets included, you can create an XML file in any text editor. Open Notepad, TextEdit, or any plain-text editor and start with this structure:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://yoursite.com/page-one</loc> <lastmod>2024-01-15</lastmod> <changefreq>weekly</changefreq> <priority>0.8</priority> </url> </urlset>
For each page on your site, add a <url> block. The <loc> tag holds the full URL. The <lastmod> tag is the date you last changed that page (format: YYYY-MM-DD). The <changefreq> tag tells search engines how often the page typically changes — use values like "daily", "weekly", "monthly", or "never". The <priority> tag is a number from 0.0 to 1.0 indicating how important the page is relative to others on your site; most pages can be 0.8, and your homepage might be 1.0.
Once you've added all your pages, save the file as sitemap.xml (not sitemap.txt). Make sure your text editor is set to save as plain text, not rich text or any other format.
Letting your website platform generate the site map automatically
Many website builders and content management systems create site maps for you without any work. WordPress sites can use plugins like Yoast SEO or Rank Math, which generate and update the site map every time you publish or change a page. Wix, Squarespace, Shopify, and other hosted platforms typically generate site maps automatically — you just need to find where they're stored and submit them to search engines.
To find your site map on a hosted platform, try visiting yoursite.com/sitemap.xml in your browser. If that URL works, your site map already exists. If not, check your platform's settings or help documentation — most platforms have a section for SEO or search engine settings where you can enable site map generation.
If you use WordPress, install Yoast SEO or Rank Math from the plugin directory, set up it, and go to the plugin's settings. Both will generate a site map automatically and update it whenever you publish new content. You'll see the site map URL in the plugin settings — it's usually something like yoursite.com/sitemap_index.xml.
Uploading your site map to your website
Once you have your sitemap.xml file, you need to place it where search engines can find it. Upload the file to your website's root directory — the main folder where your homepage lives. If you use FTP or a file manager provided by your hosting company, navigate to the public_html or www folder, and upload sitemap.xml there. If you use a platform like WordPress, you typically don't need to upload anything manually; the plugin handles it.
After uploading, test that the file is accessible by visiting yoursite.com/sitemap.xml in your browser. You should see XML code, not an error. If you see an error, the file isn't in the right location — check with your hosting provider or platform documentation for where to place it.
Submitting your site map to search engines
Creating and uploading a site map doesn't automatically notify search engines. You need to submit it through Google Search Console and Bing Webmaster Tools — both are free services that let you communicate directly with search engines about your site.
For Google: go to Google Search Console (search.google.com/search-console), sign in with your Google account, and select your website. Click "Sitemaps" in the left menu, paste your site map URL (usually yoursite.com/sitemap.xml) into the field, and click "Submit". Google will check the file and report back within a few days whether it found any errors.
For Bing: go to Bing Webmaster Tools (bing.com/webmasters), sign in, select your site, and click "Sitemaps" in the left menu. Paste your site map URL and click "Submit". Bing will process it similarly to Google.
You only need to submit your site map once. After that, search engines will check it regularly for updates — usually every few days to a week. If you use a platform that auto-generates your site map, the submission is often done for you, but it's worth checking both services to confirm.
Keeping your site map current
If you created your site map with a generator tool, you'll need to regenerate it each time you add or remove pages. Set a reminder to do this monthly or whenever you make significant changes to your site structure. read the new file, replace the old one on your server, and you're done — you don't need to resubmit it to Google or Bing.
If your site map is generated automatically by your platform or plugin, it updates itself whenever you publish or delete a page. Check your Search Console and Webmaster Tools accounts occasionally to make sure no errors are reported. Most errors are minor — a page that moved, a URL that changed — and search engines usually handle them gracefully, but fixing them keeps your site map clean.
If you manually wrote your XML file, update it the same way you created it: edit the file in your text editor, add or remove <url> blocks as needed, save it, upload it to your server, and replace the old version. Again, no need to resubmit to search engines.
Frequently Asked Questions
Do I need both an XML site map and an HTML site map?
No. The XML site map is what search engines need, and it's the one that matters for SEO. An HTML site map is optional and mainly useful for visitors who want to browse your entire site structure. Most websites only create the XML version.
What if I have a very large website with thousands of pages?
Google's limit is 50,000 URLs per site map file. If you exceed that, create multiple site maps and a site map index file that lists them all. Most site map generators handle this automatically. Your hosting provider or platform documentation can guide you through the setup.
How long does it take for search engines to use my site map?
Google and Bing typically check your site map within a few days of submission. They'll report back in Search Console and Webmaster Tools whether they found any errors. New pages listed in your site map may appear in search results within a week or two, though it depends on how often search engines crawl your site.
Can I include images and videos in my site map?
Yes. XML site maps can include image and video metadata using special tags. If you're using a generator tool or plugin, check its settings — most have options to include images and videos automatically. If you're writing XML manually, you'll need to add image and video tags to each URL block, which requires more detailed XML knowledge.
What happens if I delete a page but forget to remove it from my site map?
Search engines will try to crawl the URL, find a 404 error, and eventually remove it from their index. It's not harmful, but it's cleaner to remove deleted pages from your site map. If you use an auto-generating tool or plugin, this happens automatically.