The Plus Royal UI V3.6.1 template is free if you want to get it download here.. Download Free!

How To Change Blogger Permalink Format To Be Like WordPress URL ?

Estimated read time: 7 min
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated
How To Change Blogger Permalink Format To Be Like WordPress URL ?


There are differences in permalinks between the two platforms on this one, especially on the permalinks of posts or blog pages. Where a blog that is created using Blogger has a permalink or URL with the format of the year, month and at the end there is a .html existence.

While wordpress has a permalink that only contains text without any other format, that's because wordpress has a custom permalink feature that can be changed according to the desired permalink format. In contrast to Blogger, there is no custom permalink option provided.

Permalinks that only contain text in a format like WordPress are simpler and easier on the eyes than long permalinks with the addition of year and month formats. Then is it possible to remove the year and month formatting on the blogger Url ?

Change Blogger Permalink Format Like Permalink WordPress :-

Even though blogger does not have a custom permailink option, you can still change the Blogger permalink to be like a wordpress permalink, by using url redirection using javascript.

Definition of Permalink :-

Permalink or Link Permamen commonly called URL stands for Uniform Resource Locator is a post address of a website or one that leads to a page, a file that you often encounter on the internet.

For example the Permalink / URL provided by Blogger has the domain format yourdomain.com/ Year/Month/post-title.html.

While Permalink Permalink / wordpress URL is as follows domain yourdomain.com/post-title.

Examples of Blogger & WordPress Permalinks

Blogger :-

https://smarttechcarry.blogspot.com/2021/05/how-to-change-blogger-permalink-format.html

Wordpress :-

https://smarttechcarry.blogspot.com/how-to-change-blogger-permalink-format

How to Change Blogger Permalink like Permalink WordPress ?

Before following this tutorial, it's a good idea to first backup your Blogger template just in case an error occurs. If you have the following tutorial :-

Step 1 :- First Go To Blogger.Com And Login Your Blogger Account.
Step 2 :- Then Click on Theme Menu.
Step 3 :- Then Click on Edit Html.
Step 4 :- Then Find The <head> then Copy the code Below Right Under The Code <head> it.

<script type='text/javascript'>
//<![CDATA[
// BloggerJS v0.4.0
// Licensed under the MIT License
// Copyright (c) 2017-2018 Kenny Cruz
// github.com/jokenox
// Tutorial Published By Www.SmartTechMukesh.Online

// Setting
var config = {
// Allow dates in ticket URLs.
  postsDatePrefix: false,

// short URL just to enter the site,
// but not in its general operation.
  accessOnly: false,

  // Usar API v3 de Blogger.
  useApiV3: false,
  apiKey: "BLOGGER-API-V3"
}

var postsOrPages = ["pages", "posts"],
    blogId = "<data:blog.blogId/>",
    urlTotal, fetchIndex = 1,
    ampChar = "&amp;"[0],
    secondRequest = true,
    feedPriority = 0,
    nextPageToken;

// urlVal ();
// Validate if the URL corresponds to a post / page, 
// if not, or if it corresponds to the index.
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 > 1) return 1;
  else return 2;
}

// urlMod (); 
// Modify the URL by removing the date or the "/ p /" as well as the ".html".
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 (!config.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);
  }
}

// urlSearch (url, database);
// Look for a specific url in the database, if found,
// then it will direct to her.
function urlSearch(url, database) {
  var pathname = url + ".html";
  database.forEach(function(element) {
    var search = element.search(pathname);
    if (search !== -1) window.location = element;
  });
}

// urlManager (database, id);
// Run a URL validation, to determine with the result
// the action to perform (modify it or find it in the blog feed).
function urlManager() {
  var validation = urlVal();
  if (validation === 0) {
    if (!config.accessOnly) urlMod();
  } else if (validation === 1) {
    fetchData(postsOrPages[feedPriority], 1);
  } else if (validation === 2) {
    if (!config.accessOnly) history.replaceState(null, null, "/");
  }
}

// fetchData ();
// Make a request for blog data.
function fetchData(postsOrPages, index) {
  var script = document.createElement("script");
  if (config.useApiV3) {
    var jsonUrl = "https://www.googleapis.com/blogger/v3/blogs/" + blogId + "/" + postsOrPages +
                  "?key=" + config.apiKey + "#maxResults=500#fields=nextPageToken%2Citems(url)#callback=parseData";
    if (nextPageToken) jsonUrl += "#pageToken=" + nextPageToken;
    nextPageToken = undefined;
  } else {
    var jsonUrl = window.location.protocol + "//" + window.location.hostname + "/feeds/" + postsOrPages +
                  "/summary?start-index=" + index + "#max-results=150#orderby=published#alt=json-in-script#callback=parseData";
  }
  jsonUrl = jsonUrl.replace(/#/g, ampChar);
  script.type = "text/javascript";
  script.src = jsonUrl;
  document.getElementsByTagName("head")[0].appendChild(script);
}

// parseData ();
// Get data in JSON format, classify it
// and send them to compare the current URL.
function parseData(json) {
  var database = [];

  if (!config.useApiV3) {
    if (!urlTotal) {
      urlTotal = parseInt(json.feed.openSearch$totalResults.$t);
    }

    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 > 150) {
    fetchIndex += 150;
    urlTotal -= 150;
    fetchData(postsOrPages[feedPriority], fetchIndex);
  } else if (nextPageToken) {
    fetchData(postsOrPages[feedPriority]);
  } else if(secondRequest) {
    nextPageToken = undefined;
    urlTotal = 0;
    fetchIndex = 1;
    secondRequest = false;
    if (feedPriority === 0) {
      feedPriority = 1;
      fetchData("posts", 1);
    } else if(feedPriority === 1) {
      feedPriority = 0;
      fetchData("pages", 1);
    }
  }
}

// bloggerJS ();
// Start BloggerJS.
// You can receive as a parameter the search order for the URLs,
// that is, if it will start to compare against pages or posts.
// 0 or empty = Pages, 1 = Entries.
function bloggerJS(priority) {
  if (priority) feedPriority = priority;
  urlManager();
}

bloggerJS();
//]]>
</script>
Step 5 :- Then Don't Forget to Click on Save and See The Result.

The script above is to delete the blogger /Year/Month post format and the /p/ page and the .html exclusion at the end of the post. So if you open it later, it will look like a wordpress permalink.

Conclusion :-

That Was How To Change Blogger Permalink Format To Be Like Wordpress URL, I hope this article is useful and helpful.

It should also be noted, according to some articles I have read, deleting the blogger permalink format for blogs that are old enough or have articles that have been indexed on Google will reduce the quality of SEO, so it's a good idea to use this tutorial only for blogs that are new or don't have several indexed articles.

Refrence :
Smart Tech Carry

Rate This Article

Thanks for reading: How To Change Blogger Permalink Format To Be Like WordPress URL ?:)

Conclusion

In this article, I have shared How To Change Blogger Permalink Format To Be Like WordPress URL ?. I hope you have liked it Please do share it with your friends and follow our blog for more.

Join our Telegram Channel to get the lastest posts updates daily. Thank you!

About the Author

Hello Friends, Welcome To Our Website. My Passion is to Share Knowledge With Everyone. Also I am a Youtuber | Blogger | Web Developer | Programmer

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.