Sometimes the URL of your website lands you to the IIS default page. There have been many cases where, when people enter the link to their websites in their browser and it takes them to the index.aspx page. The cause for this is the Default Document’s setting in IIS. But do not worry if you’re facing this, we’ll show you how to change this.
- In your Windows Server 2022, open IIS.
- Open Run and type in the command inetmgr or you can search for IIS in the start menu.
- The IIS manager will open up in a new window. In the right most section, Connections, you’ll be able to see your server name. Click on it. Then click on Sites and choose your site.
- Click on the Default Document.
- In the Default Document section you’ll see a list of different documents.This list of documents is sorted in descending order of priority. So the file at the top of the list will have the highest priority while one in the end will have the least. In the screenshot below, you can see that the file Default.htm has the highest priority in contrast to index.php, which has the lowest priority. So when you go to the URL of this website IIS will look in the Virtual Directory and try to find these files, in the same order. As soon as a file is found, IIS loads the page.
- You can also try adding a default page in this list, which doesn’t exist in the website. If you place it at the top of the list IIS will display an error. This indicates that whenever you go to the URL of that website IIS looks for files in the order of the list.
So one thing that you should do is move the default file at the top of the list, so that it gets the most priority. And if IIS is able to find the file in the first go it doesn’t have to go through the rest of the files, which also increases the performance of the website.
In our case we created a new file called index.html for the sake of testing. And you’ll be able to see this when you access your website by entering your domain name.
We hope to have solved your issue with this article. Now entering your website’s URL in a browser will not land you to the IIS Windows Server page.
- Your search to the best windows hosting can end by clicking here.