How to Make a sitemap.xml File
There are lots of good reasons to have a sitemap.xml file on your site. A sitemap.xml file:
- Makes sure every page you want listed in Google is known by them to exist.
- Lets you tell Google about new pages (whenever you update it).
- Allows you to get detailed error reports and crawl information from Google (through their Search Console).
- Gives you access to diagnostic tools in the Search Console
- Sitemap.xml files are the broadly accepted submission format, for submitting a website to Google, Bing, and the other smaller search engines.
Sounds good, right? OK. Let's get started on what you need to do.
How to set up a sitemap.xml file
Many people create the sitemap.xml file on their website and think they're done. That is only the first of many steps. Having a sitemap.xml file can mean you have an actual relationship with Google; it requires some time, but it's well worth it when you're done.
Step one: Make your sitemap.xml file
Start by creating a sitemap file in XML. Google gives directions here: Google's sitemap.xml instructions to get started or you can use Sitemaps.org's instructions (recommended).
Here is the code for a simple
sitemap.xml file that only lists two pages - the page you are reading right now, and our home page:
<?xml version="1.0" encoding="UTF-8"?>
Of course, the information inside those tags will be different for your site. But if you copy that code and substitute your site's information in, making a new
<url> </url> tag for each separate URL to submit, you should be fine.
Google ignores the "priority" information in the sitemap.xml files; you can delete that line for each submitted URL if you want.
You may not want or need to include in your sitemap.xml file the URLs of every image and file on your site. Remember that every URL put into the sitemap is being displayed for broad public consumption. Don't list private login pages or anything else you don't need google to know about.
Here's a handy list of the top 10 free Sitemap.xml generator tools, from SEMrush.
Once you've got your sitemap built, look it over for glaring problems; especially if you automated the process by having one the free tools crawl through your website.
Carefully review the "priority" you have assigned each URL in the sitemap. Your index page probably should be your top priority URL, followed by the URLs that best lay out and describe your products and services, followed by keyword-heavy URLs that give info, followed by everything else in whatever order you consider them important. Ranking something a 1.00 makes it the most important. Don't rank everything the same or you're wasting this tag. Use a maximum of two decimal places (0.75 for instance) when setting importance. As for the last modified tags, don't try to "fool" the search engines by saying that you update every day when you don't. (Google currently ignores this priority information, but other search engines may use it.)
Then validate the file. You can validate xml code at XML Validator. Once your XML passes the validation, the sitemap is ready to upload to your site. Put it at the root (same folder as your primary index page) and call it
sitemap.xml to make things easier for yourself later on.
There are limits of 10,000 URLs per sitemap.xml file. If you have more pages than that, then you'll need to submit multiple sitemap.xml files (which is very easy to do). Contact us for help if you need it.
How to submit the sitemap.xml file
Simply making the sitemap.xml file and putting it on one's site doesn't actually do much of anything. One should go through the additional steps to submit it to Google (and Bing) in order to profit from all that work.
Submit your XML sitemap to Google
Start by creating a Google account. Like any Google service, setting up your account in the Google Search Console. Make sure you create the account with an email address you will be using for your webmaster duties; it doesn't need to be a Gmail account.
After you create an account, follow the instructions to add your site as a "property."
After you've added your site, you'll be asked to "verify" the site. You can either add a piece of code to the home page <head> tag or you can add a file with the name Google gives you to your site in the same folder as the sitemap. Google provides pretty clear instructions as you go. Once you've made the changes to your site (proving that you really are in control of the site), you'll be verified.
Once you're verified, submit your sitemap.xml file, giving the complete URL to Google.
Usually right away, the sitemap gets crawled. You can access detailed crawl information for your website and view any errors Google has encountered while crawling your website. You can use that information to improve your site, remove dead links, check your robots.txt file for workability, and many more tools. Google changes things up in the Search Console quite often.
Submit your XML sitemap to Bing
Here's how to submit your sitemap.xml file to Bing. Similar to Google, you need to create a webmaster account at Bing and submit it as one of your properties.
If you are in a country with your own language-specific search engine, then figure out how to submit your sitemap.xml file to it.
How to submit your sitemap to Baidu for China. .
How to submit your sitemap to Yandex for Russia.
Note: We offer a low-priced service of helping you to set up a sitemap.xml file and robots.txt file for your site - contact us for details. We'll even submit it to Google for you!
Celebrating 25 Years of Creating an Island of
Stability In the Sea of Online Confusion
Copyright © 1997-2023 Words in a Row - All Rights Reserved.