Msg#: 4277506 posted 7:09 pm on Mar 6, 2011 (gmt 0)
I am currently running a few websites on Windows Server 2008 using IIS 7 and PHP.
I recently logged into Google Webmaster Tools and notice that www.example.com was registering links from example.com even though I had set my Preferred domain in Google Webmaster Tools to www.example.com.
www.example.com is the version that is indexed but I do not like see example.com listed under "Links to your site" in Googleís Webmaster Tools. In the webmasters help Google suggests "You can also let everyone else know which version you prefer by doing a site-wide 301 redirect."
What is the best way to do this under IIS 7?
I want every page that comes up under example.com to redirect to the corresponding page under www.example.com. For example
301 redirectís too
Does anyone have any idea on how to do this?
Thanks for any help!
[edited by: Ocean10000 at 7:37 pm (utc) on Mar 6, 2011] [edit reason] Switched to "example.com" Domain [/edit]
Msg#: 4277506 posted 12:00 am on Mar 8, 2011 (gmt 0)
Jester - not create another web site, just another IIS record. Take the example.com from the original record, put it into the new record and point the new record permanently to www.example.com. From experience I always set up the new record to exactly the same web site as the original www, save the record then modify it to redirect - MS sometimes complains otherwise.
I agree with aakk9999 re: rewrite but since the IIS version is more basic you should not require the rewrite solution. Rewrite is always a second to direct IIS records.