Permalinks and semantic URLs on WordPress with IIS

Permalink e URL semantiche su Wordpress con IIS

One of the most useful features of the WordPress platform is certainly the one allowing you to customize the Permalinks for each of our posts. As you might already know, the default settings of this feature can be set via the Settings > Permalinks tab in the Admin Panel: on top of that, each specific Permalink can also be reviewed and customized in the Edit Post page. Before going further, however, it may be useful to briefly summarize what these definitions actually mean.

What are Permalinks

By reading the Permalink entry on Wikipedia, we can easily learn that this is the URL through which an HTML page will be permanently accessible on the web. It will also be the unique web address that will be stored by search engines and shown to the users.

What are semantic URLs

Let's look at Wikipedia again: there we can learn that Semantic URLs are an advanced technique used to create an appropriate permalink for any content-related web page. There are two main things making Semantic URLs better than any other technique: their readability and their consistency with respect to the content of any page they're addressing to.

Here's a good example of a Semantic URL Permalink:

And here's a common example of a non-semantic URL Permalink:

As you can see, the two features we talked about earlier - readability and consistency towards the content - are immediately visible in the first URL.

Why use semantic URLs

The most obvious advantage of a semantic URL over any other counterpart is that anyone, regardless of their IT skills, will be able to understand the page subject and main topic, even before clicking on the actual link. Even bigger benefits, however, you get a level of visibility on the web and indexing in search engines: Let's see why.

The algorithms used by every major search engine are built to presenting their search results taking into consideration the relevance of article semantics compared to the keywords used by the researcher's query. In a nutshell this means that each web page, other things being equal, will be displayed on top of any other page featuring a lesser semantic value (and vice-versa). Semantic relevance is calculated taking into account the words present in the URL, in the title and within the content of the page/post/article, which will be matched - with different weights - against the terms used to issue the search query. It is therefore clear that the possibility to have a semantic URL composed of words that reflect the content of the article is a very important feature for our SEO site.

Enable semantic URLs on WordPress

Now that we briefly summarized what permalinks and semantic URLs are, let's see how we can enable the formers and properly configure the latters. The first thing to do, as mentioned at the beginning of this post, is to set them properly on our WordPress installation's settings. In order to do this we need to access to the Admin Panel and then navigate to Settings > Permalinks. We will gain access to the following screen:

WordPress-settings-permalink-page

As you can see, the platform allows you to choose from several predefined options, many of which involve the presence of the post title, which in most cases is the easiest and most efficient way to create a semantic URL without efforts. If this is your goal-and it should be, if you read carefully the paragraph above-you already know that options 1 (Default) and 5 (Numeric) are absolutely to be avoided, as it will produce the semantic URL and therefore less effective SEO: then provided as follows:

  • option 2 (Day and name) is only recommended if you're running a "daily news" blog featuring 2-3 posts per day or more.
  • option 3 (Month and name) is recommended if you're running an informative blog featuring at least 2-3 posts per month.
  • option 5 (Post name) is probably your best choice in all other scenarios: If you don't know which one to choose, or you are a permalink newbie, this is the option for you.

Notice that option 6 gives you the ability to further configure your permalink by adding an additional level of customization: it's the option of choice for experienced users who need to reproduce specific behaviors and/or perform some SEO-related tests: you shouldn't be using that, unless you really know what you're doing.

IMPORTANT: be aware that, as soon as you apply your choice on the WordPress Admin Panel, all direct links to your posts might suddenly stop working, giving a 404 - Page not found error. If such a situation arises, it means that you also need to  properly set an appropriate url-rewriting rule for your permalinks on the Web Server that hosts your site: the same scenario will also happen whenever you change the Permalink option in the future. To avoid such issues, we strongly suggest reading this article before performing these changes.

Enable semantic URLs on IIS

If your WordPress installation is hosted on an Apache web server semantic URLs should work automatically, provided you enabled the mod_rewrite native module. This is because the standard WordPress installation already includes an .htaccess file containing all the necessary rewrite rules to serve the pages of our blog according to the various permalink configurations available.

[notification type="alert-info" close="false" ]In case you don't know the mod_rewrite Apache module you can read here what it is and then read here to find out how to enable it.[/notification]

If your WordPress installation is built upon an IIS platform, you have two options:

Needless to say, if you're using IIS 7+ you should definitely stick to the second method, otherwise you'll have to set up the first one: it could be more complex, since it involves installing and configuring a third party tool, but it will eventually give the same results.

For more informations regarding Permalinks, semantic URLs and how to properly configure WordPress to handle them we also recommend reading the relevant WordPress Codex reference page.

Happy coding!

 

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

One Comment on “Permalinks and semantic URLs on WordPress with IIS”

  1. Pingback: Change Wordpress Permalinks without breaking previous ones (404 fix)

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.