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

Pretty Permalinks

By Vincent Wondra

April 23, 2013

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: 

 <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" />
 <action type="Rewrite" url="index.php" />

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

Vincent Wondra

I'm the Founder & President of The BBS Agency & Prebuilt Sites. I have been building websites since the mid 90's. I fell in love with WordPress many years ago and today help companies leverage it's power. I'd love to help you next!