Page Nav


Breaking News:


Ads Place

How To Remove Date From Blogger Post URL

Every BlogSpot Blogger wants to customize the URL of the blog to make it looks professional and SEO friendly. Unfortunately, Unlike WordPres...

How To Remove Date From Blogger Post URL

Every BlogSpot Blogger wants to customize the URL of the blog to make it looks professional and SEO friendly. Unfortunately, Unlike WordPress Blogger does not support URL customization by default. Today in this post, we will see how we can change the URL of the blogger post by JavaScript.

How URL will look after applying this trick?

By default, Blogger’s Post URL looks like this one:

If we apply this trick to our blogger website then our new Blogger’s Post URL will look like this one:

Why we should use this technique?

Most of the new bloggers start their blogging journey with this free BlogSpot platform to gain experience. If you are planning to migrate your blog to WordPress in the future then you should use this technique. Because with this code we will remove the date and .html extension from the URL. Then blogger’s post URL will look similar to the WordPress post URL. This technique also has some disadvantages. We will discuss some advantages and disadvantages of this technique.

Advantages of Removing Date Form Blogger Post URL

  1. Obviously, the second one looks short, professional, and SEO-friendly.
  2.  It will give a professional URL/Permalink to your Blog Post just like WordPress.
  3. It will not let visitors know the published date of the blog post.
  4. It will help you get a high ranking in Search Engines.
  5. It will make your URL short and easy to remember.
  6. Your Blog Post will look super professional.

The disadvantage of Removing Date Form Blogger Post URL

Removing the date and .html from the blogger post’s URL is good but only for new bloggers. If you are ranking on the top in google then don’t take the risk to change the URL of your posts because changing the URL will affect your Site’s ranking badly.

In addition, if your pages are ranked on google, then after applying this trick your visitor will get a “404 error”, you should use the blogger’s redirect feature to redirect to a new URL.

How to remove date and .html from Blogger Blog?

Copy code in the below box, Go to the theme and you should paste that code in your HTML code just before body closing tag </head> and then save the code.

Steps to remove date from BlogSpot Site:

Step 01: Go To Blogger

Step 02: Go To Theme

Step 03: Click on Edit HTML

Step 04: Press CTRL+F and Find </head>

Step 05: Copy the Code Given Below.

Step 06: Paste That Code Above </head> Tag.

Step 07: Save your Code.

Code to remove date and .html in Blogger/BlogSpot Blog:

<script type="text/javascript">//<![CDATA[// BloggerJS v0.3.1// Copyright (c) 2017-2018 Kenny Cruz// Licensed under the MIT Licensevar urlTotal,nextPageToken,postsDatePrefix=!1,accessOnly=!1,useApiV3=!1,apiKey="",blogId="",postsOrPages=["pages","posts"],jsonIndex=1,secondRequest=!0,feedPriority=0,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!})}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=""+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];,n){"alternate"[n].rel&&t.push([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>

Note: This code will remove the date from your blogger blog. It will also remove “.html” from your blogger’s blog URL.

No comments

Have you any query or suggestions Please let us know?

Advertisement Footer