Blogging Tips

Do You Want To Remove Date From Blogger URL (Permalink)? See How

Sponsored Links

You might have been looking for ways to remove the date section in your blogger blog URL (permalink) and make it look like a WordPress blog, this post got you covered. As you go through how to remove date from blogger URL (permalink), follow the steps accordingly.

NOTE: I strongly suggest you do this on a new blogspot blog. Either with custom domain or not.

What is Blogger permalink?

Blogger permalink is the same thing as the blogger URL. The address everyone sees on their browser whenever they visit your blog post. E.g https://www.memonaija.com/2019/5/i-am-sirphren.html. You can see it doesn’t look like WordPress’s URL, which is user and seo-friendly. We can achieve this on blogger with strings of javascript code to hide the year and month from your blogger URL.

Apply Now:  How to buy .com domain for $6.06 & 20GB disk space host for $8.88 on Namecheap

SEE ALSOHow to write seo-friendly articles on Blogspot

What is the effect of removing Year and Month from blogger URL?

By default, Blogspot was built to include the date section in its permalink. There MAY be SEO implication for removing it, I cannot categorically tell you that. But before you remove it, make sure it is a new blog or add it while starting your blog from scratch. So that search engine can crawl and index your blogger blog.

If you are removing DATE from already crawled and index blogger blog, you do so at your own risk.

How to remove date from blogger URL (permalink) easily

In order to remove date from Blogspot URL, we will use a javascript code by Verluchie.

Apply Now:  SEO For Business Website: How To Write SEO-friendly Articles

Follow the steps below to do it.

Step 1. Copy the code below ( hover over it and click on [+], it will open on new tab, then copy the code)

<script type='text/javascript'>
//<![CDATA[
// BloggerJS v0.3.1
// Copyright (c) 2017-2018 Kenny Cruz
// Licensed under the MIT License
var urlTotal,nextPageToken,postsDatePrefix=!1,accessOnly=!1,useApiV3=!1,apiKey="",blogId="",postsOrPages=["pages","posts"],jsonIndex=1,secondRequest=!0,feedPriority=0,amp="&amp;"[0];function urlVal(){var e=window.location.pathname,t=e.length;return".html"===e.substring(t-5)?0:t>1?1:2}function urlMod(){var e=window.location.pathname;"p"===e.substring(1,2)?(e=(e=e.substring(e.indexOf("/",1)+1)).substr(0,e.indexOf(".html")),history.replaceState(null,null,"../"+e)):(e=(e=postsDatePrefix?e.substring(1):e.substring(e.indexOf("/",7)+1)).substr(0,e.indexOf(".html")),history.replaceState(null,null,"../../"+e))}function urlSearch(e,t){var n=e+".html";t.forEach(function(e){-1!==e.search(n)&&(window.location=e)})}function urlManager(){var e=urlVal();0===e?accessOnly||urlMod():1===e?getJSON(postsOrPages[feedPriority],1):2===e&&(accessOnly||history.replaceState(null,null,"/"))}function getJSON(e,t){var n=document.createElement("script");if(useApiV3){var o="https://www.googleapis.com/blogger/v3/blogs/"+blogId+"/"+e+"?key="+apiKey+"#maxResults=500#fields=nextPageToken%2Citems(url)#callback=bloggerJSON";nextPageToken&&(o+="#pageToken="+nextPageToken),nextPageToken=void 0}else o=window.location.protocol+"//"+window.location.hostname+"/feeds/"+e+"/default?start-index="+t+"#max-results=150#orderby=published#alt=json-in-script#callback=bloggerJSON";o=o.replace(/#/g,amp),n.type="text/javascript",n.src=o,document.getElementsByTagName("head")[0].appendChild(n)}function bloggerJSON(e){var t=[];if(useApiV3||void 0===urlTotal&&(urlTotal=parseInt(e.feed.openSearch$totalResults.$t)),useApiV3){try{e.items.forEach(function(e,n){t.push(e.url)})}catch(e){}nextPageToken=e.nextPageToken}else try{e.feed.entry.forEach(function(n,o){var r=e.feed.entry[o];r.link.forEach(function(e,n){"alternate"===r.link[n].rel&&t.push(r.link[n].href)})})}catch(e){}urlSearch(window.location.pathname,t),urlTotal>150?(jsonIndex+=150,urlTotal-=150,getJSON(postsOrPages[feedPriority],jsonIndex)):nextPageToken?getJSON(postsOrPages[feedPriority]):secondRequest&&(nextPageToken=void 0,urlTotal=void 0,jsonIndex=1,secondRequest=!1,0===feedPriority?(feedPriority=1,getJSON("posts",1)):1===feedPriority&&(feedPriority=0,getJSON("pages",1)))}function bloggerJS(e){e&&(feedPriority=e),urlManager()}bloggerJS();
//]]>
</script>

Step 2. Log in to your blogger blog, then go to your template section.

Step 3. Click on theme/template and then EDIT HTML. Before you proceed, backup your template in case things go wrong.

Step 4. Locate the <head>. Do you see <head> in the diagram below? Good!

Step 5. Paste the code you copied above directly below <head> and then save your theme. Done! You can now check your blog posts.

Apply Now:  Free eBook On How To Create WordPress Blog In 2023: My Blog Companion

The most interesting part is, it will also redirect the default blogger permalink to this new one.

READ ALSO: How to redirect error 404 page to Home page in blogspot

Wrapping up how to remove DATE from Blogger URL (permalink)

With this javascript code, you can now remove year and month from blogger post URL and make it look like the WordPress blogs. If you want to try this trick, do so on a brand new blogger blog. I also just started a blogger blog to see how this removal of date from blogger permalink work for SEO.

Do you find this article interesting? Endeavor to share with friends

Sponsored Links

Leave a Reply

Back to top button