-
All links indicated in the sitemap must be absolute, that is, they must look something like this:
http://www.example.com/
. -
The sitemap must meet the requirements of the desired search robot, since some of them have certain conditions for using this file.
-
The sitemap used by the search engine crawlers is only a recommendation. Robots can ignore it in case of errors in the map itself or for other reasons of their own.
-
Some special characters must be required disguised.
Sitemap.xml syntax
When creating a sitemap, you need to adhere to a certain syntax. A minimal sitemap with the correct syntax looks something like this:
version = "1.0" encoding = "UTF-8" ?> <urlset< span=""> xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" > </urlset<> <url > </url <loc > </loc http://example.com/ > > >
Tags:
In file sitemap.xml
the following tags apply:
-
Is the prologue of the XML file. This line specifies the XML encoding and version. This line should always be the first and is required. Required tag
-
.
- the parent tag, inside which all subsequent instructions to the site pages are placed using tags. Required tag
The opening tag must indicate the current protocol, that is, like this:<urlset< span=""> xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" > </urlset<> . >
-
.
- a tag that contains itself URL-address and information about it. Required tag -
- a tag that indicates a specific URL. Required tag
-
- the date of the last change. Optional tag
-
- the likely frequency of changes to this page. This tag is for guidance only. Optional tag
Valid values:-
always
- check changes at each indexing. -
hourly
/daily
/weekly
/monthly
/yearly
- check changes at a certain interval. Every: hour / day / week / month / year. -
never
- never check for changes.
-
-
- priority URL relative to other URL specified in the sitemap. The value is set from 0.0 to 1.0, by default for all URL is equal to 0.5. Optional tag
Masking characters
In XML files for all data (including URL-address) masking of the characters listed in the table below should be used.
Symbol | Masking | |
---|---|---|
Ampersand | & | & |
Single quotes | ' | ' |
Double quotes | " | " |
More | > | > |
Less | < | < |
Creating a group of multiple sitemaps
If the file sitemap.xml
has a size of more than 50 MB or includes more than 50,000 links, then it should be divided into several files, while creating sitemap.xml
file leading to other sitemap files.
Example sitemap index file:
version = "1.0" encoding = "UTF-8" ?> <sitemapindex< span=""> xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" > </sitemapindex<> <sitemap > </sitemap <loc > </loc http://www.example.com/sitemap1.xml > > <sitemap > </sitemap <loc > </loc http://www.example.com/sitemap2.xml > > >
The sitemap index file has the following syntax:
-
Is the prologue of the XML file. This line specifies the XML encoding and version. This line should always be the first and is required. Required tag
-
.
- parent tag, inside which all subsequent references to sitemap files are placed. Required tag -
.
- the tag that contains URL-address pointing to the sitemap file and information about it. Required tag -
- a tag that indicates a specific URL to the sitemap. Required tag
-
- date of the last change. Optional tag
Sitemap generation and validation services
Examples of services used to generate and validate sitemaps.
Generation services
-
xml-sitemaps
-
mysitemapgenerator
-
xmlsitemapgenerator
-
Wordpress sitemap generator plugin
-
check-domains
Validation services
-
xml-sitemaps
-
Yandex webmaster tools
-
websiteplanet
-
seoptimer
-
seositecheckup
-
mysitemapgenerator