How to Set Up Wordpress Pretty Permalinks in a Windows Environment Running IIS?

Default Wordpress URL looks like http://mydomain.com/?p=123. It is not a user-friendly SEO URL. Inorder to achieve the SEO friendly URLs, you can use Wordpress Permalinks. After enabling the permalinks, you will see the category, tag, title, and post in the URL. You can also use keywords inside your URLs. Following steps will be helpful to set up Wordpress Pretty Permalinks in a Windows Environment Running IIS.

  1. Login to your Wordpress Admin. It is https://mydomain.com/wp-login.php

  2. Go to Settings >> Permalinks.



  3. At Common Settings, choose the required permalinks structure that you want to use. Here, we have chosen the Post name most used by SEO Expert. postname is the unique identifier to locate your Wordpress post from the DB. Wordpress custom structure will also allow you to structure of website URL which you want.



  4. Once you select the version, remove the /index.php and only add /%postname%/ and click on Save Changes Button. In this case, if your Wordpress page named blog.php, it will show up as http://mydomain.com/blog/

  5. Open the web.config file in IIS. It is an equivalent file of .htaccess in Linux cPanel. You can use FTP to access web.config file or you can directly connect using the RDP.

  6. You can create the web.config file if it doesn't exist and Add the below code inside your web.config file.Save the file if you have connected it through RDP. You need to save and upload this file in case you have used FTP.
     
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="WordPress Rule" stopProcessing="true">
                        <match url=".*" />
                        <conditions>
                            <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>
        </system.webServer>
    </configuration>
    
  7. Save the file if you have connected it through RDP. You need to save and upload this file in case you have used FTP.

  8. Access your Wordpress website and now it should show the page which we have discussed in point number (4).

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to add Google reCaptcha Protection on Wordpress?

Google reCAPTCHA is a free service from Google which helps to protect your websites from spam and...

How to Install WordPress Through Softaculous?

Once you get the Login details for your cPanel account, You can easily install the WordPress with...

How to solve Too Many Redirects Error in WordPress?

Wordpress is one of the most used CMS in the World. You may find some issues in Wordpress due to...

How To Fix An Error "SSL certificate problem: unable to get local issuer certificate"

This error can be encountered while upgrading WordPress or installing a WordPress plugin from the...

How to install Woocommerce on your Wordpress?

If you have installed the Wordpress and want to run an online store, we highly recommend you to...