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

Illustration of a man in a suit holding a flaming hoop labeled "Pretty Permalinks," symbolizing website management and SEO techniques.

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.

Illustration of a man in a suit holding a flaming hoop labeled "Pretty Permalinks," symbolizing website management and SEO techniques.
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 installed,ย WordPress installed (duh!),ย the Microsoft’s URL Rewrite module installed.

Smiling man with curly hair wearing a black leather jacket, giving a thumbs-up gesture, symbolizing confidence and positivity.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!

Share the Post: