How To Build A Sitemap.XML And Upload It To Your Website

in #sitemap7 years ago



A "Sitemap.xml" is a file that points out URLs (the links of a website's pages, posts, etc.) to search engines like Google, Yahoo and Bing. A Sitemap represents an organized, compact list of the links of the website ; thus serving as a flashlight for search engines, making them easier to notice and crawl each section of the website in question.


Not surprisingly, sitemaps are first introduced by Google to make search robots' work easier in a continuously expanding online universe of information. This practice also embraced by other search engines and it became a standard among webmasters to add Sitemap.XML to their websites.

But...

  • Creating a Sitemap does NOT automatically guarantee better results for search engine rankings (a.k.a. SERPs)

  • While having a Sitemap.XML dramatically increases the possibility of URLs' inclusion into a search engine's index, it does NOT provide any sort of guaranteed results. It's completely up to the search engine to honor Sitemap's request. There are numerous websites out there without a Sitemap and they have the most of their pages indexed, and vice versa.

The Advantages Of Using A Sitemap.XML

  • Using a Sitemap.XML CAN help search engines to find your content faster

  • If your site is brand new and has very "thin" content, it would be harder for a search "bot" (or "robot") to notice your website's content. In such scenario, your site's visibility could benefit from the organized and strict structure of a Sitemap.XML

  • If your website has massive content on it, it would be harder for crawlers to notice each section of your online presence. A Sitemap CAN be a life saver in this case. (This is valid especially if your pages are not linked to each other thoroughly, considering search bots MOSTLY follow links to explore new content on the web.

  • If you are a photographer and you believe that "a photo is worth a thousand words", think again. When search robots crawl a website, their primary interest is TEXT. If your website mainly consists from images, it wouldn't be easy to awaken crawlers without a Sitemap.XML

How To Build A Sitemap.XML File?
"Do I Already Have The Tools I need?"

You can create and/or customize your Sitemap.XML even with the simplest editor like NotePad on PC or TextEdit on a MAC.


Note: Please keep in mind that the final Sitemap.XML file you're going to upload to your server MUST BE encoded with "UTF-8 Character Encoding". We refer to the first line of the XML document here (yes, a Sitemap is basically an XML file). As you see below, the first line of a Sitemap.XML file starts with the statement..:




IMPORTANT: The document itself should be saved with ANSI encoding.




An Example Sitemap.XML

Below you can see a valid Sitemap.XML file of an imaginary website which has only 3 pages. A "home" page, a "terms and conditions" page, and an "about us" page. Let's assume that the URLs for those pages are..:


Then, our Sitemap.XML file for the website above would look like..:




Please notice the tags that contain the "colored" data here. Each one of them are wrapped between the "url" tags, and we repeated this process 3 times (because we have 3 pages) by using specific values for each website page.


But what if we had 10000 pages? Yes, then we would repeat the process 10000 times. Please do NOT worry, there are easier and AUTOMATED ways to do all of this. We will talk about an automated Sitemap.XML generator that creates your Sitemap from scratch in just a few seconds.


However, you can use this basic knowledge to keep things on track, and free from any errors. Keeping yourself familiar with the structure of a basic Sitemap.XML will absolutely help you in the long run. You can customize your Sitemap.XML files even without the need of a plugin or an online service. You can easily detect any errors even if you're still using one of these automation tools. For example, we customize our Sitemap.XML on our own, then upload it to our server via FTP (File Transfer Protocol).




What Does Those Values Mean?

Below you will see the mostly used "data fields" for a basic Sitemap.XML


  • The value between "loc" tags..: Using the "loc" tag is COMPULSORY, while "changefreq" and "priority" tags are OPTIONAL. This value represents any page(or URL) of your website. If your website has 50 pages and you want them all to be crawled, then this means that you should have 50 different "url" sections like you see on the image above. Note that each "url" should begin with the protocol "http://" as we have seen with the examples above. Before entering your url (address) please do not forget to paste it into your browser bar to see if it IS working or not.

  • The value between "changefreq" tags..: This value represents the "frequency of update" of the url you have entered between "loc" tags. How frequently the content on that specific url changes? This is a way to tell Google "Hey, you should check back this page daily / weekly / monthly OR yearly etc etc". This field can hold only one of the "data" you see below (with lowercase letters)..:
    • "daily"
    • "weekly"
    • "monthly"
    • "yearly"
    • "hourly"
    • "never"
    • "always"

  • The value between "priority" tags..: This value acts as an indicator that states the importance of the url when it's compared with the other pages on your website. The value you can use here ranges between "0.1" - "1". As we stated before, the value you enter here has nothing to do with your search engine rankings.

Below you see an example diagram about the process of adding new content (adding new URLs) to an existing Sitemap.XML




In case if you are wondering, the ORDER of url sections does NOT have any effect on crawling process. Being first on the Sitemap.XML does not provide any kind of advantage to the URL. They are all equal in importance unless you clearly state it inside the "proirity" tags as we discussed before


How To Create An XML Sitemap Automatically?

You can use an automatic Sitemap generator to create your sitemap. It allows you to specify the values we've talked before (except the "last-modification" tag which basically informs the "search bot" about the date of the latest update of the related URL.)




As soon as you hit the "start" button, the process begins. The script of the online Sitemap creator examines each one of your URLs (pages/posts/portfolio items ; any pages) and builds a Sitemap.XML in a few seconds (or, minutes, according to the size of your website). When your Sitemap.XML is finally ready, you can download it to your computer's desktop by clicking the link you see below..:




Now it's time to benefit from the knowledge you have gained from this article


"I Have Downloaded The Sitemap.XML, Now What?"

Open the Sitemap.XML you have downloaded by using a simple text editor like NotePad (just "right-click" on the XML document itself > Open With > NotePad)... What you will see will not be any different from our examples above. As you'll notice very quickly, the "change frequency" and "priority" of all urls will be holding the same values when you first open the document which may not be suitable for your needs. Now, as already being familiar with a Sitemap.XML's structure, you can customize those values as you wish. You can customize the "change frequency" of each url and their importance ("priority") as long as you respect the coding syntax.


If you add a new content (URL) to your website, you can update your Sitemap.XML easily with the knowledge you have gained from this article. Just add a new "URL" section which wraps the "loc" / "changefreq" / "priority" tags and you're ready to go after you "save" your updated document!


Once you re-uploaded your Sitemap.XML after a customization, you can also validate it by using an online Sitemap.XML validator.


"I Have Customized The Sitemap.XML. Where Should I Upload It, And How?"

If your Sitemap.XML is ready, then you should upload it to your server by using a free FTP program (FTP = "File Transfer Protocol"). An FTP program enables you to perform file exchanges between your computer and your server (your server is the place where your website is loaded). By using an FTP program you can upload files to your website. (You can download one of the most popular FTP programs from here, for FREE)


If you are a beginner, this may sound a bit confusing but it's really nothing different from moving a file from your desktop to another folder. Instead, you will move a file (Sitemap.XML) from your desktop to your server's root directory which is usually named as "public_html" OR "wwww"...




"How To Notify A Search Engine About My Sitemap.XML?"

Search engines are tend to notify Sitemaps by their nature, but you can also speed up the process by submitting your Sitemap.XML's url to them. (i.e. You can use Google Webmaster Tools to notify Google about your Sitemap.XML)


Sort:  

Congratulations @lamegliogioventu! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got a First Vote

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 61226.21
ETH 2715.69
USDT 1.00
SBD 2.45