Generating an XML sitemap is only half the battle. To get the full SEO benefit, you need to submit it to Google Search Console so that Google knows exactly where to find your site's complete page list. This guide walks you through the entire process from start to finish.
What Is Google Search Console?
Google Search Console (formerly Google Webmaster Tools) is a free service provided by Google that helps website owners monitor and maintain their site's presence in Google Search results. Among its many features, it allows you to submit sitemaps, monitor indexing status, identify crawl errors, and analyze search performance.
If you have not set up Google Search Console for your website yet, that is the first step before you can submit a sitemap.
Step 1: Set Up Google Search Console
To get started, visit Google Search Console and sign in with your Google account. You will need to add and verify your website property.
Google offers two property types:
Domain property: Covers all subdomains and protocols (e.g., http, https, www, non-www). This is the recommended option as it provides the most comprehensive data. Verification requires adding a DNS TXT record through your domain registrar.
URL-prefix property: Covers only the specific URL prefix you enter (e.g., https://www.example.com). This option offers more verification methods including HTML file upload, HTML meta tag, Google Analytics, or Google Tag Manager.
For most website owners, the URL-prefix method is easiest to set up. Simply add an HTML meta tag to your site's head section or upload a verification HTML file to your server's root directory.
Step 2: Generate Your XML Sitemap
Before submitting, you need an up-to-date XML sitemap. Use SiteMapr to generate one:
- Visit SiteMapr and enter your website URL
- Configure crawl settings (max pages, depth, subdomain inclusion)
- Click Generate and wait for the crawl to complete
- Download the XML file from the results panel
Make sure your sitemap only includes pages you want indexed. Exclude pages with noindex tags, redirect pages, and error pages from your sitemap for best results.
Step 3: Upload the Sitemap to Your Server
Upload the downloaded sitemap.xml file to your web server's root directory. The standard location is:
yourwebsite.com/sitemap.xml
You can use FTP, SFTP, your hosting control panel's file manager, or your deployment pipeline to upload the file. Most modern web frameworks and CMS platforms also have built-in or plugin-based sitemap generation that automatically places the file in the correct location.
Verify that the file is accessible by visiting the URL in your browser. You should see the raw XML content of your sitemap.
Step 4: Submit the Sitemap in Search Console
Now that your sitemap is live on your server:
- Log in to Google Search Console
- Select your website property from the dashboard
- In the left sidebar, click on Sitemaps under the Index section
- In the "Add a new sitemap" field, enter the path to your sitemap (e.g., sitemap.xml)
- Click Submit
Google will confirm the submission and begin processing your sitemap. This does not happen instantly. It may take anywhere from a few hours to several days for Google to fully process all the URLs in your sitemap.
Step 5: Monitor Sitemap Status
After submission, Google Search Console provides valuable information about your sitemap's processing status:
- Success: The sitemap was read successfully and Google is processing the URLs
- Has errors: The sitemap was read but contains some errors that need fixing
- Couldn't fetch: Google was unable to download the sitemap file
Check the status regularly, especially after the initial submission. The Sitemaps report shows:
- The number of URLs discovered in your sitemap
- The number of URLs that were successfully indexed
- The last time Google read your sitemap
- Any errors or warnings encountered
Adding Your Sitemap to robots.txt
As an additional best practice, reference your sitemap in your robots.txt file. This allows all search engines (not just Google) to discover your sitemap automatically.
Add the following line to your robots.txt file:
Sitemap: https://yourwebsite.com/sitemap.xml
This line can be placed anywhere in the robots.txt file and works independently of any User-agent directives.
Troubleshooting Common Issues
Sitemap Returns 404 Error
If Google reports it cannot fetch your sitemap, verify the file exists at the exact URL you submitted. Check for case sensitivity issues and ensure your server is not blocking the Google crawler through firewall rules or server configuration.
URLs Not Getting Indexed
Not every URL in your sitemap will necessarily be indexed. Google makes its own decisions about which pages provide enough value to include in its index. Common reasons for non-indexing include thin content, duplicate content, pages blocked by robots.txt, and pages with noindex meta tags.
Sitemap Errors
Validate your XML sitemap using an XML validator to ensure there are no syntax errors. Common issues include invalid characters, incorrect encoding, missing required tags, and URLs that return non-200 status codes.
Exceeding Size Limits
Google accepts sitemaps up to 50MB uncompressed or containing up to 50,000 URLs. If your site exceeds these limits, split your sitemap into multiple files and create a sitemap index file that references all the individual sitemaps.
How Often Should You Resubmit?
You do not need to manually resubmit your sitemap every time you update it. Once submitted, Google will periodically re-fetch and process your sitemap automatically. However, if you make significant changes to your site structure or add a large batch of new content, you can resubmit to prompt Google to recrawl sooner.
Keeping your sitemap current and properly submitted to Google Search Console is one of the most effective and straightforward SEO practices available. It costs nothing, takes minutes to set up, and provides long-term benefits for your site's search visibility.