How to

Best Way To Remove Date and HTML Extension In Blogger – 2024

Want to remove date and HTML extension from your blogger permalink, check out this article which helps you to remove date and HTML extension in Blogger permalinks.

Everybody wants to remove the date and HTML extension from their blogger permalink, but they do not get the right information on it.

In the previous article, I had shown to you 12 Quick Methods To Improve Website Speed in Blogger. But in this article, I will show you how to remove the date and HTML extension in Blogger. Blogger although a great source for creating a money-making blog for free has certain limitations

One of the limitations in the blogger is the permalink option which is not available to us to change the permalink.

Blogger Permalink is trash

Example:-

The blogger has only a default permalink (https://www.example.com/year/month/post-title.html) Whereas it is possible in WordPress to change the permalink easily without having any plugin installed or without any implementation of the code.

But in blogger, it’s quite difficult to remove. However, you can remove the date and HTML extension from the blogger permalink by adding a little bit of javascript code in your blog theme So before getting to code, let’s understand some terms.

Basically, a permalink is a URL structure of a particular website. If you consider this page itself, it has a URL structure (https://www.shoutmeback.com/remove-date-and-html-extension-in-blogger)

The above URL is nothing but a permanent location of my post. Therefore, it is called permalinks

It is necessary to remove the date and not use any special symbol in the blogger permalink for search engine optimization.

Search engines also have a ranking factor algorithm regarding your blog permalink. The permalink should not be the length and must not contain any date format or a special symbol. Recently, Backlinko analyzed over 1 million SERPs (search engine result pages).

They found that the post that does not contain any date month or any other format in the permalinks ranks better than others in comparison to other competitions. So, if you want to rank well on Google, you will have to remove the date present in blogger permalinks.

Google and other search engine algorithms to rank a website change year by year. Recently, google’s hummingbird algorithm changed a lot of factors to rank a website up to 200+ factors.

One of the factors included was no extension in the URL. Leaving an extension in the URL is bad for SEO. Also, when you scan your website for SEO through CheckBot, you will notice that it will display “Don’t Use Extension” while analyzing the SEO of your site.

You can also notice any Google-related sites like Google Adsense community center etc, that none of the sites contain webpage extension in their URL.

As a blogger, you need to have a little knowledge about implementing the codes in the theme. There is a javascript code available on the internet that helps to remove date and HTML extensions in blogger permalinks.

But, there is no guarantee of how well it will affect your SEO. It could be good or it could be worse as the code developer had not described it as safe or bad for SEO.

But you can implement and try it all by yourself and if you think that it is creating any problems remove the code. Before you try to implement the code, take a backup of your theme.

To create a backup of your theme, follow these steps:-

  1. Go to your Blogger dashboard.
  2. Click on the “Theme” section present on the left side of the window below the “Layout” section.
  3. Select “Format Theme” on the screen’s top right side.
  4. Click on “Download Theme” and your current theme code will be downloaded in your downloads destination folder.

Once, you have taken a backup of your theme, it is time to implement the remove date & HTML extension code in the blogger.

The implementation part is simple if you read and follow the steps properly. However, if you had any problems during implementing the code, comment below. I will solve the problem for you.

To implement the code in your blogger theme, follow these steps:-

  1. Copy the below code. Go to your blog theme in the “theme” section
  2. Click on “Edit HTML”. Search for the “/body” tag and paste the copied code just above the “/body” tag.
  3. Save your theme.
  4. All done, you had successfully removed the date and HTML extension in the blogger.

Code:-

   
 //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();  
 //]]>  
   

“The above code was taken from “WonderKrish” with proper backlink and credit is given to them”

If something goes wrong with the implementation, you can use the backup of your theme which you had taken before implementation.

Keep in mind to always create a backup of your theme before implementation. It is the most important step to revert any error changes in the future.

To install the backup theme in Blogger, follow these steps:-

  1. Login to your dashboard. Click on the “theme” section on the left sidebar.
  2. Click on “Backup/Restore” located at the top right corner.
  3. Tap on the “Upload Files” and select your backup theme.
  4. After selecting, click on “Import”.
  5. You had successfully installed your backup theme in the blogger.

I had covered all the points required to remove the date and HTML extension in the blogger. However, it is not mentioned by the code developer whether the code turns your SEO good or bad.

So, try it at your own risk. If you have any problem related to any queries, you can comment below and I will provide the solution fast.

Please share the post with your other friends who want to remove the date and HTML extension in blogger permalinks.