+5 votes
280 views
How to create a Sitemap xml file

in SEO by (552k points)
reopened | 280 views

1 Answer

+3 votes
Best answer

Sitemap or site maps can help SEO positioning, because all pages can be found. In addition, the sitemap consists of an XML file that presents the fields that can be read by a search engine and that in turn allow you to know the structure of the site you are visiting. Sitemap.xml files are used by search engines to better understand the structure of the site. On the other hand the search engines do not have the obligation to follow the links that each page has.

image


The code that will come within the sitemap.xml file can be;

 <? xml version = "1.0" encoding = "UTF-8"?> <urlset xmlns = "http://www.google.com/schemas/sitemap/0.84" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd "> <url> <loc> http://www.nombredelsito.com/ </ loc> <priority> 1 </ priority> </ url> <url> <loc> http://www.nombredelsito.com/index.php </ loc> <lastmod> 2009-05-23 </ lastmod> <priority> 1 </ priority> </ url> <url> <loc> http://www.nombredelsito.com/posts/alojamientoweb.php </ loc> <lastmod> 2009-03-20 </ lastmod> <priority> 0.1 </ priority> </ url> </ urlset> 


The word priority is a way of telling the search engine's robot which pages are preferred to be indexed in the first place:
The priority is that the search engines do not have the need to index the entire site, that is, if it is going to index only one part, first that it indexes the page that is presented with the highest priority and leaves the lowest priority for another analysis.

In http://www.xml-sitemaps.com/ you can access a very useful tool to create sitemaps.
On the other hand, the maximum size that the Sitemap should have is 10Mb.

In a sitemap.txt file, only the URLs of the pages of the site you wish to index will be listed:

http: //sitio/pagina1.html
http: //sitio/pagina2.html
http: //sitio/directorio/pagina3.html

It will be placed at the root of the site and sent to the search engines. Also in the text file only the URLs should appear.

For a sitemap.xml file
It allows additional functions such as including images to be indexed and appear in the results of searches of Google Images, videos, the date of modification of the pages to ensure their reindexacion.

The file is located at the root of the site, it is also possible to include it in the robot.txt.

by (3.5m points)
edited

Related questions

+3 votes
1 answer
asked Jun 23, 2019 in SEO by backtothefuture (552k points) | 189 views
+4 votes
1 answer
asked Jun 24, 2019 in SEO by backtothefuture (552k points) | 220 views
+3 votes
0 answers
+4 votes
1 answer
asked Dec 3, 2019 in Windows 10 by backtothefuture (552k points) | 337 views
+3 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users