How to eliminate "www". at the beginning of the urls on the server?

A poorly worded title, but I want to do what StackOverflow does when someone types in www.stackoverflow.com: it redirects immediately to stackoverflow.com, completely eliminating www..

Imo, this is a more modern way of doing things: www.redundant and (soon to be) archaic. This also violates an important principle that I want to use in my web application: that each unique and valid page should be accessible with only one URL.

I understand that this is a server thing, so I expect an answer that web hosting should take care of this. Since I do not start my own servers, my question is: is it possible to do this on shared hosting or do I need to start a dedicated server to configure IIS for this?

+3
source share
3 answers

Rewriter IIS URLs allow you to easily configure a canonical domain rule so that all requests are either redirected to www or not www of your choice. Learn more about how

In addition, several .net hosting providers have this module installed, so you can configure this option as on your iis server.

+5

www. , . cookie, , stackoverflow.com .

, , , - :

'WWW' ASP.NET MVC 1.0

, , .

+3

- . DNS, no-hostname A .

. , URL IP- . , , , server1334.hostingprovider.com, .

+1

Source: https://habr.com/ru/post/1772705/


All Articles