- Business and Employment»
- E-Commerce & How to Make Money Online
How to Create a Sitemap Script
The When, the What and the How Of Sitemap for SEO
How Does a Sitemap Help SEO?
A sitemap is an extremely important part of xml scripting. It was created for a search engines crawler.
When a visitor arrives at a website, not having visited it before, they may at some time get lost.
A webmaster will provide a page for these visitors called sitemap.The end result is a listing of every URL on that website so a visitor can click on the page that they are looking for.
This is good for a user to find everything easily, but a search engine doesn't use this for it's sitemap.
The sitemap for a user is in HTML.
The sitemap a search engine uses is in xml format.
The xml version is a similar listing, but with extra information regarding important aspects of each individual URL.
The priority, importance, update frequency, last time and date the URL was updated and most importantly, each individual URL's location.
When a new webmaster uses the script, it is understandable that they find it complicated.
The scripting language used is very simple. Within a couple of minutes a novice can easily start writing the script. Once finished it is then uploaded to the website as a page, ready for search engine submission along with the website.
The sitemap has to be readily available. All the time!
If a website isn't being accessed by a search crawler, then it wont have any available search queries. The reason being - if a search engine can't access a website, how can it be expected to show a search result?
A Script can Use Every Attribute
SEO Experts all Use the Sitemap Script
Sitemap Data Breakdown
<loc> </loc> - Location tag. This is where the URL of a page is inserted.
<changefreq> </changefreq> - Change frequency tag. A rough estimate of how often the page is updated.
<lastmod> </lastmod> - The last time the page was modified.
<priority> </priority> - The importance of the page is placed here ranging from a value of 0-1. Increments of decimal places are used to determine importance.
Increasing SEO with the Sitemap Script
There are 4 sections in the sitemap that are of use to a webmaster. The <loc> </loc> (location) <changefreq> </changefreq> (change frequency), <lastmod> </lastmod> (last modification) <priority> </priority> sections.
Although every pages URL is listed, not all of the sections have to be used.
The sections that are of most interest are the location, change frequency and last modification tag.
Although the priority section is able to be used, a search engine will in a way determine what websites pages are of more importance, or interest to a visitor.
The benefits of a website incorporating a sitemap script in there SEO plan is phenomenal.
Crawlers now have easy access to your entire websites URL structure and more importantly, vital information regarding those URL's.
The best way to "SEO" a sitemap so a crawler can find it, is to link to it from your robots.txt script.
Sitemap Protocol Tag
Create a Sitemap and Identify the Protocol
The program used to create the script is available on all windows systems, notepad.
It is easily found in the start menu.
If it isn't listed, just search for notepad in the search bar and the icon will be listed.
Once the sitemap is complete, it has to be saved as an xml file.
To save it as an xml sitemap file, simply save the script with the name sitemap.xml.
For a video demonstration visit SEO Basics
Look at the image above.
To start and end the script, the <urlset> </urlset> tag is used.
The start of the tag is where the protocol being used is placed. It is inserted after the first tag. i.e <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">.
The last urlset tag is placed to close the entire sitemap.
Everything else in between those tags is URL data.
The URL Parent Tag
Inserting URL's into a Sitemap Quick-Guide
Notepad needs to be opened to type the script into.
The urslet tag needs to be entered to open and close the script.
Each listed URL has there own sequence. Starting and ending of an individual URL's data begins and closes with the URL parent tag. Then the child tag and other data is inserted between the tags.
The child tag is the <loc> </loc> tag. This is the location of the individual URL.
A sitemap will contain every websites page URL and data with there own parent and child tags.
Sitemap Script - Parent and Child Tags
The term parent and child tags is referring to the value of each of the tags.
the url tag is considered the parent tag as it is the tag needed to open or start the process of listing a URL.
The location tag is considered the child tag as it required after the parent tag. The inability to place it in the script without the use of opening and closing parent tags makes it redundant.
After the protocol and urlset tags are in place, it is time to set the URL parent and child tags.
Typing the opening parent tag is used to indicate that a URL and its credentials are being listed.
Once the tag is opened, it's time to place the pages location with the child tag.
The following example portrays a sitemap that is listing a URL.
<urlset xmlns="http://www.sitemaps.org./schemas/sitemap/0.9"> (This has set the URL Protocol and started a URL set). <url> (This tells the crawler that a URL is about to be entered). <loc>http://www.yourwebsite.com/</loc> (This has told the crawler the location of that url. </url> (Closes off the previous listing. Repeat the entire process for another url). </urlset> (This has closed the entire sitemap).
The Lastmod Tag is of Importance
The Last Modified Sitemap Tag Attributes
The tag for displaying the last modifications made to the page is the <lastmod> </lastmod> tag attribute.
The tag has many attributes that are applied.
The tag displays the date of last modification, the time of the update in 24hr format and the local time setting where the update was done. This is all written in American format, per the ASC (American Standards Code), as this is the code used for any computer scripting.
If a page was modified in Adelaide, Australia at 08:00 a.m in the morning. An updated lastmod tag would appear like so.
The first section is for the date. The capital T sets the time. The last is the local time setting. Adelaide, Australia is GMT+09:30. All that gets written is numerical value.
Now you understand the concept of creating, adding attributes and modifying the script. Now it's time to write your own.
The Sitemap and SEO?
How do you think the sitemap impacts a search engine crawler?
© 2013 Martin Heeremans