March 21, 2014

Create a Sitemap For Label in a Static Page of Blogspot


Sitemaps are used to get all the links of the website or blog to a particular page. Usually Google suggest sitemap for visitors. But administrators use them to make it a technique to increase the rate of crawling of the links of the page. So what if we use a different sitemap for bloggers than existing one. In this post I am sharing tips how to create a Sitemap For a Specific label in a static page of blogger.

Difference between XML sitemap and HTML sitemap

In this post, I will show you detailed step by step practical tutorial on Difference between XML sitemap and HTML sitemap and how to Add XML Sitemap for Blogspot Custom Domains in Webmaster tools.

XML is primarily for the search engines while HTML is written for the users. A XML sitemap protocol is for search engine spiders or bots to detect site links. An HTML sitemap includes titles of all your posts and links for the users to see and navigate.

Add XML Sitemap for Blogspot Custom Domains in Webmaster tools



We can create label sitemaps for posts.. 

Existing labels are used as categories in blogger. Well, let us change them, and make it more like a sitemap.

The existing label link is like following:
<a href=”http://www.example.com/search/label/ship%20me%20this”>One touch SEO</a>


Such a link consist of
"%20" which is not good and it uses a search method rather than opening a specific page. SO we need a link which should be like the following:
<a href=”http://www.example.com/p/onetouchseo.html”>ship me this</a>


How To Create a Sitemap For a Particular label?

By changing the structure of the links of labels, the websites can get more internal linking with each posts. Hence get higher page ranking in search results. Now  how to create sitemap page for specific label. 

Copy the below code to a notepad.



    <script type="text/javascript">
    var numposts = 100;
    var standardstyling = true;

    function showrecentposts(json) {
      for (var i = 0; i < numposts; i++) {
        var entry = json.feed.entry[i];
        var posttitle = entry.title.$t;
        var posturl;
        if (i == json.feed.entry.length) break;
        for (var k = 0; k < entry.link.length; k++) {
          if (entry.link[k].rel == 'alternate') {
            posturl = entry.link[k].href;
            break;
          }}
        posttitle = posttitle.link(posturl);
        if (standardstyling) document.write('<li>');
        document.write(posttitle);}
        if (standardstyling) document.write('</li>');
    }
    </script>
    <ul>
    <script src="http://www.example.com/feeds/posts/default/-/Your Label?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts&amp;max-results=999"></script>
    </ul>

    

Replace www.example.com with your blog URL
Replace Your Label with "Search%20Engine%20Optimization" not "search engine optimization". This is because the script identifies the link rather than the name of the label.



The script will show 100 post links in the page.
You can add content like an introduction before the script is added to post page.

    Log in to your blogger account.

    Go to blogger dashboard > Click on the Pages tab > Create New Page > Select a Blank Page.

    Go to the HTML mode above the post body beside compose tab.

    Paste the code after editing to it

    Click publish and see what did you get.

   This trick is very useful and need to be taken care in a careful manner.

Create a Sitemap For Label in a Static Page of Blogspot

 The protocol of sitemap

 If it helped you, subscribe us for more posts