How to Create an XML Sitemap for Your Blog or Website

How to Create an XML Sitemap for Your Blog or WebsiteIf you have web hosting for a blog or website, then you can use an XML sitemap to make it easier for search engine bots to scan your pages. You can consider an XML sitemap as exactly that, a map of your site. While it isn’t necessary for SEO, it is helpful in ensuring that all of your pages are indexed and ready to appear in search whenever someone searches for a relevant term or keyword.

What is an XML File?

For anyone not familiar with XML format, you should learn about XML before attempting to create your sitemap. XML is a type of markup language designed to be simple, easy to use, and compatible with all search engines. Popular web document formats including RSS and XHTML use XML syntax, as do Microsoft Word, Open Office, and iWork. The format can be done by hand or by using a program, and supports many different types of Unicode.

What does an XML Sitemap Do?

There are a lot of myths about XML sitemaps including that they increase your SEO. This is not true and your SERPS will not improve if you include a map on your site. However, you should still think about ensuring that you have one. As written in the introduction paragraph, the sitemap is great for ensuring that search engine bots know which pages to visit and index. If your pages are not indexed, they will not come up in search. However, it is important to note that you don’t necessarily need a sitemap for pages to come up in search, but it does help. Other factors including having links pointing in to each page can do just as much or more good for your site.

Create an XML Sitemap with a Plugin or Extension

If you want the fast and easy method of creating a sitemap, all you have to do is look for a plugin to do the work for you. In this case, you should look at the reviews, make sure that other people have downloaded the plugin, and then install it on your site. Installation methods vary between WordPress, Drupal, and Joomla, but usually it is very easy to search and install an app. Popular options include Google XML Sitemaps for WordPress which provides automated sitemaps, XML Sitemap for Drupal, and Qlue Sitemap for Joomla. There are plenty of options out there so feel free to look around until you find something you like.

Creating an XML Sitemap by Hand

If you want to create an XML sitemap on your own you will have to keep a few things in mind. The first is that you will have to manually update it each time you add a new page to your site.

Use a website - Your first option is to use a website to create an automated xml sitemap. One of the most popular is xml-sitemaps.com. The website is fairly simple and easy to use as you mostly just submit your URL and then download the sitemap.

Manual - You can also create your sitemap manually. Start with a simple .text or equivalent file as Microsoft Word and other text editors might add unwanted HTML formatting to your text. You can save the text file into an .xml.

You can copy and paste the following lines into your text document, but typing will probably create better results:

<?xml version=”1.0″ encoding=”UTF-8″?>

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

Next type “<URL>” minus the quotation marks.

Type “<Loc>” followed by the first URL, followed by “</Loc>”, once again, minus the quotations. This is mandatory.

Repeat this step for each link in your xml sitemap.

You can also include various formatting definitions. <lastmod> can be used directly beneath the URL to indicate the last modification.

<Loc>www.example.com</Loc>

<lastmod> 4/12/2013</lastmod.com> 

You can also include the tag <changefreq> to indicate how often this page will be updated. ‘Monthly’ ‘Daily,’ ‘Weekly’ and so on are all good tags for this.

<priority> can be used to indicate the priority of the link, valid ranges go from 0.0 to 1.0 with one being the highest. Default priority is 0.5.

Finally, finish your XML sitemap with </urlset> to close off the XML. Overall, your XML should look something like this if you choose to use all of the tags.

<?xml version=”1.0″ encoding=”UTF-8″?>

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

<url>

<Loc>www.example.com</Loc>

<lastmod> 4/12/2013</lastmod.com>

<Changefreq>weekly</Changefreq>

<priority>0.5</priority>

</urlset>

From there, all you have to do is repeat the URL portion for each URL you want to link to. While it might seem a bit intimidating at first if you aren’t familiar with XML, it’s actually fairly easy, especially if you simply copy/paste most of your tags. Make sure you look over your XML page to make sure it is error free, and then feel free to upload it to your site.

Brandy Cross is a full time writer for The High Tech Society. She loves tech, science, gadgets, and most of all, SEO.

  • Very good article on the different ways to submit an XML sitemap. Personally I prefer the automated approach and just edit the .xml code where need after...