WordPress permalinks settings and custom URL structure

Permalinks are one of those terms that many bloggers use on an everyday basis, but not many of them understand them completely. They are very important, and even before starting a blog, you should think about the best structure for your site. But before you can customize them properly, you should know what permalink are and how they affect a site.

Those types of URLs that lead to posts, pages, categories, tags, images and other content on your site are unique to each website and page on it. As they should be infinite and never changed, they are called permalinks (short for permanent links).

Imagine permalinks as direct addresses to the content that can be found on a site. If you can imagine a website as a city, each content category would be a street, while every single permalink would act as an address with its unique number.

Why you should change permalink structure

From the very moment you install WordPress, permalinks will be set and active. Each new post that you publish will get a unique link, and everything will work without problems. So, a common question among beginners is why even to consider changing the permalink structure in the first place.

While in many cases you should follow the philosophy of “don’t fix it if it ain’t broken”, this is not one of those moments. Default permalink structure in WordPress looks ugly, and it can cause problems both for your visitors and search engines. By default, WordPress uses a plain permalink structure that looks like this: http://example.com/?p=123.

Many bloggers use the date structure which they simply don’t need. For example, while timestamps can help sites that depend on news articles, they can hurt other types of websites. Just try to imagine yourself in a situation where you stumble upon on an article which points a few years back into the past. Even if the post weren’t time-sensitive, you would immediately assume it was outdated and not worth reading, wouldn’t you?

So, to help all users, and also to help search engines to index your pages appropriately, it is important to change the default permalink structure into something more visually appealing both to humans and machines.

What is the best one you should use?

Although there is no correct answer to this question, the Internet is full of debates on perfect permalink structures. We suggest that you try to avoid the default (plain) permalink structure which uses only page IDs. This is considered harder to index properly, and it’s not user-friendly at all.

But any other permalink structure may or may not be suitable for your site. It all depends on what are you writing about. If you tend to write dozens of news article per day, it is just natural that you include time and date in your permalinks. On the other hand, if you have a few famous authors which you need to distinguish, no one can tell you not to add author slug into the permalink structure. So, as you can see from these examples, everything depends on the blog you’re creating.

Anyway, most of the WordPress websites use “Post Name” structure or a similar custom one. By having the posts’ names in the permalink, you get the chance to include the keyword directly into the address of your article. This might help search engines to rank your article better. Even popular SEO plugins for WordPress will warn you if the focus keyword is not in the permalink. From user’s perspective, don’t you think that it is better to have the title of the post in the link than just having an ID or date?

How to change permalink structure

When you decide it is time to change permalink structure of the blog, navigate to Settings -> Permalinks.

On permalinks settings page, you can see six available options for changing the URLs on your site:

  • Plain – post ID in a non-user-friendly format
  • Day and name – year/month/date format followed by post name
  • Month and name – year/month format followed by post name
  • Numeric – post ID number
  • Post Name – sanitized name of the post
  • Custom – allows you to build custom structure with ten available tags

Permalinks common settings

To change the structure, just select the option you like and save changes. Well, that’s at least true for the first five options, while the custom one needs a little bit more action from your side.

How to use a custom structure

When using a custom permalink structure, WordPress allows you to use ten different tags that describe your links:

  • %year% – year of the post
  • %monthnum% – month of the year
  • %day% – day of the month
  • %hour% – hour of the day
  • %minute% – minute of the hour
  • %second% – second of the minute
  • %post_id% – the unique post ID number
  • %postname% – sanitized version of the title of the post (post slug field)
  • %category% – sanitized version of the category name (category slug field)
  • %author% – sanitized version of the author name

Feel free to use any combination of tags that you like. By default, only the name of the post appears in the custom permalink, so it makes it the same as the “Post Name” structure that you can already select from the list.

For example, if you rely heavily on categories, you can change your permalinks structure to contain both category and post name tags:

http://example.com/wordpress/%category%/%postname%/

While building a custom structure, don’t forget to add a slash sign “/” after each tag.

Keep the same structure

Since permalinks affect the entire site, it is important that you keep them the same all the time. It would be the best if you would decide on the permalink structure even before publishing your first post. In case you change it in the future when you might have dozens or hundreds of published posts, modifying the permalink structure may cause traffic loss. Search engines will already have the old permalinks indexed, and users might have bookmarked them in their original form.

If you still need to change the structure, don’t worry. It can be done, but you will need a redirection plugin that will patch up the whole thing and point search engines and users to the new link when necessary.

The Category and Tag Base

Categories and tags have archives pages. For example, if you have a category “cakes”, and you want to list out all the articles that fall into that specific category, you would have to navigate to http://www.yoursite.com/category/cakes.

As seen from the example, the permalink contains the “category” base. On the bottom of the Permalinks settings page, you can find options to change that base to anything else you like.

Category and tag base

For example, if you are building a site dedicated to cooking, you might have categories only for your recipes. So, instead of naming it “category”, it would more reasonable to have the base changed to “recipes”. If you changed the option, your new permalink would look like this: http://www.yoursite.com/recipes/cakes.

The same goes for tags. Instead of http://www.yoursite.com/tag/chocolate, you might want to change the base to, let’s say, “ingredients” if you had only ingredients as your tags. So the new permalink structure would look like this: http://www.yoursite.com/ingredients/chocolate.

Final thoughts

As they define the entire fabric of the blog, permalinks are the essential part of your site. Because of that, you should not ignore them. Before you start to customize the site and write articles, it is crucial that you think about permalinks and customize their structure to the needs of your website. Trust us; it is much better option to do it now than to struggle with redirections once you realize that the plain structure just isn’t good enough.

START YOUR OWN BLOG

This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

Leave a Reply

Your email address will not be published. Required fields are marked *