iisurl-rewritingvpsno-www

how to fix site not loading without www on vps windows server 2019


how can I disable required www on my website domain? I am using windows server 2019 on vps. currently website is loading with www.dgkeys.ir but not loading without www dgkeys.ir


Solution

  • There is no restriction for windows server or IIS to block non-www domain name.

    Since www.dgkeys.ir and dgkeys.ir are different level domain names. If You have public domain for both www.dgkeys.ir and dgkeys.ir. Please go to your domain provider's portal and point it to the same IP address.

    WWW looks to be a CNAME for your web server.So the FQDN could be www.dgkeys.ir. I think it is hard to create a FQDN called dgkey.ir in windows server. Because it just looks like an AD domain name not an FQDN.

    Besides, you could try to open notepad as administrator and open C:\Windows\System32\drivers\etc\hosts Then add xxx.xxx.xxx.xxx dgkeys.ir for local testing purpose.