In this article, I will share some ideas about sitemap and How to create an HTML sitemap or XML sitemap for blogger?
Here is the Table of Content, you can use it to navigate though the post.
Table of Content
What is Sitemap?
A sitemap, as the name suggests, is basically the map of you blog or website.
The sitemap contains every URLs of your blog/website. Sitemap helps search engines crawler like google bots to crawl and index your site more efficiently.
Read More: How to Remove Date from Blogger URL? - SubTechz
A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files.
A Sitemap is of two types: HTML Sitemap or XML Sitemap.
What is HTML Sitemap?
An HTML Sitemap is just like the regular blog post which is visible to user as well as to the search bots.
The best thing about the HTML sitemap is that it shows all the post and pages in an organized manner to the visitors.
Read More: 11 Blogging Tips for Beginners (Blogger) - SubTechz
An HTML sitemap allows site visitors to easily navigate through a website.
Site visitors can go to the Sitemap to locate a topic they are unable to find
by searching the site or navigating through the site menus.
What is XML Sitemap?
This HTML Sitemap can also be created in XML format and submitted to search
engines so they can crawl the website in a more effective manner.
An XML sitemap help the search engine bots to navigate through all the links in your site and add it to their database.
An XML sitemap file contains all your post URL with additional information of each URL such as indexing priority, updating frequency or the size of your sitemap which can affect the crawling rate of your blog.
Read More: How To Enable Gzip Compression in Blogger ? - SubTechz
Using the Sitemap, search engines become aware of every page on the site, including any URLs that are not discovered through the normal crawling process used by the engine.
Sitemaps are helpful if a site has dynamic content, is new and does not have
many links to it, or contains a lot of archived content that is not
well-linked.
How to create HTML Sitemap in Blogger?
Creating an HTML Sitemap in Blogger is very easy with these steps:
Step 1: Sign in to your blogger account.
Step 2: Go to Page Section and Click on "New Page"
Step 3: Now change page view from Compose to HTML.
Step 4: Copy the Code from below and paste it inside the page. Don't
forget to change the highlighted URL with your original blog URL. Now Click on
Publish and You are done.
<script type="text/javascript">
var postTitle = new Array();
var postUrl = new Array();
var postPublished = new Array();
var postDate = new Array();
var postLabels = new Array();
var postRecent = new Array();
var sortBy = "titleasc";
var numberfeed = 0;
function bloggersitemap(a) {
function b() {
if ("entry" in a.feed) {
var d = a.feed.entry.length;
numberfeed = d;
ii = 0;
for (var h = 0; h < d; h++) {
var n = a.feed.entry[h];
var e = n.title.$t;
var m = n.published.$t.substring(0, 10);
var j;
for (var g = 0; g < n.link.length; g++) {
if (n.link[g].rel == "alternate") {
j = n.link[g].href;
break
}
}
var o = "";
for (var g = 0; g < n.link.length; g++) {
if (n.link[g].rel == "enclosure") {
o = n.link[g].href;
break
}
}
var c = "";
if ("category" in n) {
for (var g = 0; g < n.category.length; g++) {
c = n.category[g].term;
var f = c.lastIndexOf(";");
if (f != -1) {
c = c.substring(0, f)
}
postLabels[ii] = c;
postTitle[ii] = e;
postDate[ii] = m;
postUrl[ii] = j;
postPublished[ii] = o;
if (h < 10) {
postRecent[ii] = true
} else {
postRecent[ii] = false
}
ii = ii + 1
}
}
}
}
}
b();
sortBy = "titledesc";
sortPosts(sortBy);
sortlabel();
displayToc();
}
function sortPosts(d) {
function c(e, g) {
var f = postTitle[e];
postTitle[e] = postTitle[g];
postTitle[g] = f;
var f = postDate[e];
postDate[e] = postDate[g];
postDate[g] = f;
var f = postUrl[e];
postUrl[e] = postUrl[g];
postUrl[g] = f;
var f = postLabels[e];
postLabels[e] = postLabels[g];
postLabels[g] = f;
var f = postPublished[e];
postPublished[e] = postPublished[g];
postPublished[g] = f;
var f = postRecent[e];
postRecent[e] = postRecent[g];
postRecent[g] = f
}
for (var b = 0; b < postTitle.length - 1; b++) {
for (var a = b + 1; a < postTitle.length; a++) {
if (d == "titleasc") {
if (postTitle[b] > postTitle[a]) { c(b, a) }
} if (d == "titledesc") { if (postTitle[b] < postTitle[a]) { c(b, a) }
} if (d == "dateoldest") { if (postDate[b] > postDate[a]) { c(b, a) }
} if (d == "datenewest") { if (postDate[b] < postDate[a]) { c(b, a) }
} if (d == "orderlabel") { if (postLabels[b] > postLabels[a]) { c(b, a) }
} }
}
}
function sortlabel() { sortBy = "orderlabel";
sortPosts(sortBy); var a = 0;
var b = 0;
while (b < postTitle.length) {
temp1 = postLabels[b];
firsti = a;
do { a = a + 1
} while (postLabels[a] == temp1);
b = a;
sortPosts2(firsti, a); if (b > postTitle.length) { break
} }
}
function sortPosts2(d, c) { function e(f, h) {
var g = postTitle[f];
postTitle[f] = postTitle[h];
postTitle[h] = g;
var g = postDate[f]; postDate[f] = postDate[h]; postDate[h] = g;
var g = postUrl[f];
postUrl[f] = postUrl[h];
postUrl[h] = g; var g = postLabels[f]; postLabels[f] = postLabels[h]; postLabels[h] = g;
var g = postPublished[f]; postPublished[f] = postPublished[h]; postPublished[h] = g;
var g = postRecent[f];
postRecent[f] = postRecent[h];
postRecent[h] = g
}
for (var b = d; b < c - 1; b++) {
for (var a = b + 1; a < c; a++) { if (postTitle[b] > postTitle[a]) { e(b, a) }
} }
}
function displayToc() { var a = 0;
var b = 0;
while (b < postTitle.length) {
temp1 = postLabels[b]; document.write(""); document.write('<div class="post-archive"><h4>' + temp1 + '</h4><div class="ct-columns">'); firsti = a;
do { document.write("<p>"); document.write('<a " href="' + postUrl[a] + '">' + postTitle[a] + ""); if (postRecent[a] == true) { document.write(' - <strong><span>New!</span></strong>') } document.write("</a></p>"); a = a + 1
} while (postLabels[a] == temp1);
b = a; document.write("</div></div>"); sortPosts2(firsti, a);
if (b > postTitle.length) { break
} }
}
</script>
<script src="https://yourblog.blogspot.com/feeds/posts/summary?alt=json-in-script&max-results=9999&callback=bloggersitemap" type="text/javascript"></script>
How to create XML Sitemap in Blogger?
Creating an XML Sitemap for blogger is really very easy.
Just go to Settings and then to Custom robots.txt and just paste the following line of code in it. Don't forget to change the highlighted URL with your original blog URL.
Sitemap: https://yourblog.blogspot.com/atom.xml?
redirect=false&start-index=1&max-results=500
Conclusion
In this Post We talked about the Sitemaps, HTML and XML Sitemaps and how to create HTML sitemap in Blogger and How to Create XML sitemap in Blogger.
I hope this article was helpful to you.
If you have any suggestion or thoughts do let me know in the comment section.
Read More: Create and Submit Blogger Sitemap to Google Search Console - Sub Techz
Nice Post.
ReplyDeletePost a Comment
Spam Comments or any spam links are not allowed here!🙏
Note: Your comment is moderated by the Admin.