How to get Pretty Permalinks for WordPress working on a Windows server

WordPress is very SEO friendly. One of the most popular features of WordPress in the SEO world are it’s “Pretty Permalinks” that automatically use your pages and posts keyword rich titles in the URL.

This is easy to do on a Linux server.  Just go into your Dashboard –> Settings –> Permalinks and set it to Post name and click Save Changes.  

It is anything but easy to do on a website host running Windows.  When faced with this challenge, it felt like searching   jumping through flaming hoops while doused in gasoline.

How to get Pretty Permalinks for WordPress to work on a Windows Server

Seriously… it was anything but easy to get working.

Let me save you the pain and frustration.  Here is how to make it work.

Move to a Linux server.

Seriously… if you are running WordPress be on a Linux hosting account. Everything is so much easier.  Linux and WordPress are like peanut butter and jelly. They are just made to go together.

Enable Pretty Permalinks on a Windows Server

Sometimes have no choice but to host your WordPress website on a Windows server.  Sorry to hear that.  But if your server has the following, I can help. :  IIS 7 or above with FastCGI and PHP installedWordPress installed (duh!), the Microsoft’s URL Rewrite module installed.

You just got Pretty Permalinks to work on a Windows Server! Nice job!If you are unsure if you have the prerequisites installed, please contact your website hosting provider.

  1. Open up a text editor and create a new file
  2. Copy/paste in the code that follows into your new text file.
  3. Save the file as web.config
  4. Upload the file to the root of your WordPress installation
  5. Log into your WordPress install  Dashboard –> Settings –> Permalinks and set it to Post name and click Save Changes.  
  6. TaaDaa!  You should now have Pretty Permalinks on a Windows server!

Here is the code: 

<rewrite>
 <rules>
 <rule name="Main Rule" stopProcessing="true">
 <match url=".*" />
 <conditions logicalGrouping="MatchAll">
 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
 </conditions>
 <action type="Rewrite" url="index.php" />
 </rule>
 </rules>
</rewrite>

Best of luck to you. If that doesn’t work… look at a Linux server. Seriously… it’s so much easier!

Vincent Wondra

Founder & President of BBS, Bootstrap Business Solutions a WordPress website development and design agency. He believes that every business deserves an easy to update, scalable, versatile, and stable website. Follow me on Google

Comments

  1. I always use WordPress on Linux servers, it’s the best choice! Now I have a client who wants WP on a Windows Server, so I will save this info, and I will tell you more if finally I need it.
    Thanks for the post!

The BBS Agency

The BBS Agency