Skip to main content

follow us


As we know, Blogspot has permalink setting default with structure http://www.namedomain.com/month/year/article-title.html. And for some people it's a pretty long and not cool permalink. Okay, the question, can you change Blogspot Permalink? Because the Links on Blogspot contain months, years and html suffix. And the answer is yes. We can use a Javascript redirect which will be explained below.

Howdy? Today iweblogsite will write about How to Change and Delete Date and Month Permalink Blogspot with javascript code. Because many requests and questions in the related blogger group change the blogspot permalink, a special redirect script is created that is placed above the head code in the blogspot template. But before, we learned first about permalink.

Also read : Download Free Template Premium Landing Page Blogspot

About blogspot permalink


For a blogger and SEO expert, you must know what a permalink is. Permalink or permanent link is a permanent link that leads to a post on a website or blog that we have. Simply put is the link that appears on our browser address when accessing a page.




This permalink that we will partially delete. For default settings, blogspot users can freely use permalink, but can only change permalink containing only post titles such as "namedomain.com/month/year/title-postingan.html".

As for the "/ month / year /" structure and the ".html" suffix cannot be changed and deleted. Well this time we managed to get a special javascript script that can delete the two elements above. So you can use permalink like Wordpress CMS users by just using "domainname/post-title" only. Curious? let's see below.

How to change or delete Month and Year Structure Permalink Blogspot


A script called BloggerJS This is javascript that can change the permalink URL format on a blog with the blogspot platform. Visually creates better navigation and looks professional.

The step is you just open your blogspot dashboard, then go to the template, edit the template and look for the head code or then you copy the code below and place it right below the head code:


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


After that, in the "blogID" section, replace it with the Blog ID that you have. You can get it on the active URL in the browser when opening your own blogspot dashboard.

Also read : How to embed videos uploaded on blogspot to be responsive and more seo

Save. Then go to the main page of the blog. Open a post. And it works! Now that permalink your blog's post URL has changed from what used to be like http://www.namedomain.com/month/year/article-title.html to http://www.namedomain.com/article-title, isn't it cool?

Very Not recommended for SEO purposes


Finally, we strongly don't recommend using permalink above for SEO purposes on your blog. Why? Because the Blogspot platform is basically intended to use permalink with the structure of the month and year with the html suffix. If you change it, that means it's against Google's provisions, and Google doesn't like it.

In addition, using this script can eliminate ads on your blog. In most cases, there are many Adsense Ads that don't appear when using this artificial permalink. So how? Still want to choose to use this script?

The script is actually only for learning purposes. Or it can also be used to create a company profile blog that does not prioritize SEO factors. To make it look more professional and eliminate the impression of free on the blogspot platform.

Conclusion


So the conclusion that can be taken is that you are still free to use it on your blog. It's just that there are many disadvantages that you will get when using this script (if indeed your main goal is to build a blog to get traffic). Because in our opinion this is a redirect script that will indirectly damage the main permalink structure.

Also read : How to set a new sub domain from blogspot custom domain

As a result, maybe your blog pagerank will decrease, followed by dropped traffic and your blog becomes no SEO Friendly anymore. Therefore we are not responsible for what happens to your blog when using this script.

Thus the article about How to Eliminate Moon, Year and Html Permalink at Blogspot URL this time, hopefully you can increase your knowledge as a blogger. Don't forget to share this article with your other friends by sharing this article permalink to your social media or chat.

You Might Also Like:

open comment