What Is a web.config File?

If your server uses IIS, you can use web.config files to control your website’s configuration without editing your server configuration files. You can even apply different settings to different directories within your website.

You can easily create a web.config file by creating a plaintext file and uploading it to your server. If you have multiple web.config files, remember that files higher up in the filepath always take precedence. If you want to make a configuration change to your whole server, we recommend editing server-level IIS settings instead.

Before making any changes to configuration files, we strongly recommend you take a backup of the file.

Some common uses for web.config files include:

  • redirecting URLs to be more easily readable (e.g., mysite.com/product/shirt instead of mysite.com/prodid=1234)
  • loading custom error pages (e.g., 404 pages)
  • forcing your site to use https instead of http.
  • password protecting certain directories
  • preventing hot-linking

If you have a server that uses Plesk, we recommend using the Plesk control panel to change these types of configurations instead of web.config files. You can also use the File Manager in Plesk to edit the web.config file.

  • windows, web, config
  • 216 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

Best Editor for Web Development 2017

Best Web Development Tools of 2017: Editors/IDEs and Package Management The worlds of web...

Will my site be marked unsafe in Chrome 56+?

Lately there’s been a lot of speculation about Googles up-coming changes to how sites without an...

How does an SSL work?

Every single day 100s of terabytes of data is being transferred across the internet. In fact,...

How KernelCare Protects Your Server

One of the most important things you can do to ensure the security and stability of your Linux...

Most Common Site Migration Questions

Migration FAQ Is There a Cost? Most cPanel to cPanel or Plesk to Plesk migrations with root...