How can I redirect example.com
to www.example.com
using DNS / IIS? I wish to do this for an asp.net web site to prevent duplicate contents (Bad for SEO).
I had 2 a record in dns (Windows Server 2008) for example.com
and www.example.com
.
Also in IIS I added example.com
and www.example.com
in edit bindings.
Which changes should I do in my IIS and DNS to redirect example.com
to www.example.com
?
Should I change the web.config
file in my project?