An XML sitemap is a file that lists a site’s webpages for search engines to discover and add to their databases. Then, search engines can deliver that content to users in the search engine results pages (SERPs).
A sitemap’s URL is typically “domain.com/sitemap.xml” or “domain.com/sitemap_index.xml.”
You can also find a domain’s XML sitemap URL by Googling “sitemap site:domain.com filetype:xml.”
Like this:
If your site doesn’t have a sitemap, create one with a sitemap generator tool.
Google can find your XML sitemap on its own, but submitting the sitemap to Google ensures it is found.
From there, Google crawls your sitemap and (hopefully) gets your pages ranking for relevant results, sooner.
Let’s walk through the process.
How to Submit a Sitemap to Google
To submit an XML sitemap to Google, connect your site to Google Search Console. It’s free and takes very little time.
First, follow the steps in our guide to Google Search Console to connect your site. Then, continue with the steps below.
Step 1: Navigate to Your Domain in Google Search Console
Log in to your Google Search Console account.
In the top left corner, select your site from the drop-down if you have more than one.
Step 2: Go to the “Sitemaps” Report
Go to the “Sitemaps” report in the left sidebar’s “Indexing” section.
Step 3: Add Your Sitemap
Paste your sitemap’s URL into the “Add a new sitemap” section. Then, click “Submit.”
You’ll see a message confirming that your sitemap has been successfully submitted.
Google crawls submitted sitemaps as soon as it can. Check the “Sitemaps” report again within a few hours or days to see if Google processed your sitemap successfully.
If so, you’ll see a status of “Success.”
How to Remove and Resubmit Sitemaps
If your site architecture has changed or your sitemap has errors, remove and resubmit your sitemap.
Like this:
- Log in to your Google Search Console account
- If you own multiple sites, use the drop-down menu in the top left corner to select the site
- Click “Sitemaps” under the left sidebar’s “Indexing” section
- In the “Submitted sitemaps” section, click the line with the sitemap you want to remove
- Click the three-dot menu icon in the top right corner. Then, click “Remove sitemap.”
- Confirm the removal by clicking the “Remove” button in the pop-up window that appears
Wait for Google to process your request.
Alternatively, delete the sitemap file from your site. Google will eventually stop checking it if it’s unavailable for a certain period.
If your new sitemap has the same URL as the original, don’t delete your sitemap. Simply resubmit it using the steps above. Google will reprocess it.
If you don’t have a sitemap (or don’t resubmit it), search engines can still find your site’s pages. But it could take longer. Or even overlook some pages entirely.
So, resubmit your sitemap as soon as possible by following the steps above.
Sitemap Best Practices
Follow these best practices to help Google process your sitemaps efficiently:
Include Only the Essential Information
Your sitemap should contain:
- The URLs you want to have indexed: Don’t include pages that you don’t want indexed
- The “lastmod” value: This value says when a page was last updated. Search engines refer to it to decide whether to recrawl the page for new content.
- The “hreflang” values of your URLs’ local variants: If your pages have localized versions, indicate them in the sitemap so search engines can crawl each version.
Don’t include:
- The “changefreq” and “priority” values: Google ignores these values
- Non-canonical URLs: Google should skip these URLs because they’re alternative URLs to the same page
- 3xx or 4xx URLs: Google shouldn’t index or rank these URLs, as they redirect users to a different page (3xx status code) or return a client error (4xx status code).
Keep to the Size Limit
Keep your sitemap within Google’s size limit—meaning 50MB (uncompressed) and 50,000 URLs.
If your sitemap exceeds the limit, split it into multiple sitemaps.
Create Multiple Sitemaps If Needed
Create multiple sitemaps if your sitemap exceeds the size limit. Or to have separate sitemaps for different content types (e.g., a sitemap for pages, a sitemap for posts, and a sitemap for videos).
You’ll need to create a sitemap index file that lists all your sitemaps. Like a table of contents.
Here is Semrush’s sitemap index, for instance:
Then submit the sitemap index URL to Google just like you would a regular sitemap.
Common Sitemap Issues and How to Fix
Common sitemap issues include:
- Formatting errors: There are errors in your sitemap file’s format, like missing XML tags
- Incorrect URLs: Your sitemap contains URLs that aren’t supposed to be in a sitemap (e.g., redirects and non-canonical URLs)
- Too large: Your sitemap has exceeded Google’s size limit
Find and fix sitemap issues by navigating to the “Sitemaps” report in Google Search Console.
If your sitemap has a “Couldn’t fetch” or “Sitemap has # errors” status, Google provides suggested solutions.
Alternatively, audit your site with Semrush’s Site Audit tool. To detect sitemap problems and other technical SEO issues like broken links and slow load speeds.
Set up your site as a project in the tool. Then, configure and run your audit.
Once the audit has finished, click the “Issues” tab and search for “sitemap.” A list of possible issues with your sitemap will appear.
If your site has an issue, click the link with the number of affected pages:
This will open a new report with a full list of affected pages.
Then, click the “Why and how to fix it” link to get a detailed description of the issue and recommendations for fixing it.
After you’ve fixed all the sitemap-related issues, run another audit in Site Audit to ensure they’re resolved.
Source link : Semrush.com