Casbay Knowledge Base

Search our articles or browse by category below

Permalink in WordPress Hosting

Last modified: October 1, 2022
Estimated reading time: 4 min

Permalink in WordPress Hosting

Please take note that due to NGINX setup, the permalink settings that can work is “PLAIN” or “CUSTOM STRUCTURE”.

Do not change the permalink settings to any other options or your website will not be visible. 

Should you accidentally changed the permalink settings to other, you can select again PLAIN or if you select CUSTOM STRUCTURE, make sure you fill in this in the custom field:

/index.php/%year%/%monthnum%/%day%/%postname%/

TL;DR: Permalinks in WordPress = “permanent links.” Those are the permanent URLs of the blog posts and pages on your WordPress site. For example, the permalink of this very blog post that you’re reading right now is: https://casbay.com.my/blog/permalinks-in-wordpress/

Permalinks are also among the key parameters of any WordPress post, and something that you should set right away after you launch your shiny new website.

Here’s why:

Why permalinks in WordPress are important

Basically, it’s through permalinks that the world identifies the individual pieces of content on your WordPress blog … as grand as it might sound.

For instance:

  • If another blogger wants to link to your content, they point to one of your permalinks.
  • If you want to share your content on social media, you share the permalink.
  • If Google wants to index a piece of your content, they use the permalink.
  • If you want to show your content to a friend, by mentioning it in an email for example, then you give them the permalink.
  • I might be missing some important uses, but you get the gist.

The problem with permalinks in WordPress

The main problem with permalinks in WordPress, as great as they are, is that the default permalink setting – the one that WordPress comes preinstalled with – isn’t optimized at all.

If you go to your wp-admin / Settings / Permalinks right after installing WordPress, you’ll see this:

Permalink in WordPress Hosting common settings

The default permalink structure therefore is:

http://www.YOURSITE.com/?p=123
  • where “123” is the ID of a given post or page in the database.

Why is this bad?

The chief reason is that a structure like that gives you no possibility to optimize the permalink for neither human beings nor Google (not good for your SEO).

Here’s why:

Say you publish a piece of content on, “Why Jamon Iberico Is the Greatest Ham in the World.” If your permalink is:

  • http://www.YOURSITE.com/why-jamon-iberico-is-the-greatest-ham – then you’re basically giving everyone a hint as to what this piece of content is about. This goes for both Google and human beings. Every person, algorithm, and bot can decode that information.
  • http://www.YOURSITE.com/?p=27 – then no one knows anything. As simple as that.

How to set permalinks in WordPress

Okay, luckily, this is very simple. But the task is two-fold:

  1. You need to set the permalink structure right after you launch a new WordPress site.
  2. You should set the permalinks for every piece of content individually.

In that scenario, #1 will give your site the right structure to work with for the future. And with #2 you can fine-tune the individual permalinks of all your posts and pages.

Let’s explain both of those quickly:

1. How to set the permalink structure in WordPress

1.1 Setting up a simple permalink structure

To set your permalink structure, go to your wp-admin / Settings / Permalinks. Once there, select this option:

permalink in wordpress hosting post name
  • Just to make sure we’re on the same page, it’s the one labeled “Post name.”

Now, why this one?

Quite simply, it holds the least amount of unneeded clutter… There are no seemingly random numbers, no dates, no arbitrary words (like “archives”). There’s just the post name that you can control 100% (more on that in the next point).

Note. Why you don’t want dates in your permalinks? The main reason is because dates discourage your visitors from reading your older content. Any date that’s older than last week (or so) looks like out-of-date information, despite the fact that it might still be very valid, or might even be evergreen.

After you select that new permalink structure (“Post name”), just click “Save Changes” at the bottom of the settings page:

permalink strcture

1.2 Adding custom permalinks

Another great way to set up permalinks is by using a custom structure. These are permalinks ending with .html or .php extension.

A user migrates his website with .html extension in the post’s URL and wants to keep everything almost exactly the same. To make the content easier to crawl for Google bots, i.e., to make it SEO friendly.

Whatever the case, here’s how to do it:

We are going to follow the same steps mentioned above, except this time we will use custom structure.

Usually, the custom structure will have the following code:

/%postname%/

If you don’t see it, enter the above code in the custom structure box and hit the save button.

Next, install the WordPress plugin titled Add Any Extensions to Pages.

Once you do that you will be able to open it via Settings → Add Any Extension to Pages. Enter the .html or other extension that you’d like to add and click on Update Settings.

permalink in wordpress hosting

One final step, go back to Settings → Permalinks and just click on the Save Changes button without actually changing any of the settings. This will reset the permalinks – a required step to make the new extensions work.

2. How to set the individual permalinks for posts/pages

Once you have the overall permalink structure set, you can proceed to tweaking your individual posts and pages.

This can be done through each individual post’s or page’s editing screen. When you’re editing content, you’ll see this little area directly below the title field:

permalink in wordpress hosting

You can click on the “Edit” button and adjust that permalink. A box will appear, and you can put pretty much whatever you wish there:

edit permalink in post or page

The standard, though, is to either use the given post’s whole title or some simplified version of it. For example, this post’s title is, “What Are Permalinks in WordPress? How to Set Them and Why,” but the permalink part is just, permalinks-in-wordpress, just like you can see above.

Note. Try not to update the permalink structure once you publish your post or page. One of the main ideas behind permalinks is that they are permanent, hence the name. Changing those links later on makes finding your content more difficult for people as well as search engines.

For more information, please visit our Global site Knowledge Base for more WordPress Hosting topic guidelines.

Was this article helpful?
Dislike 0
Previous: HOW TO: Automatically add affiliate links to keywords in WordPress
Next: How to Fix Internal Server Error on Your WordPress