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

  • 0

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).


Was this answer helpful?

« Back
Sign up for a newsletter

chat