Hello, Does anyone knows if it is possible to gain permanent redirect (301) with proper DNS settings (a, cname...) from a non www to www site. I have a website which SE see as a two sites with and without www. I want it like this: you enter google.com and browser instantly change it to www.google.com. TIA
I don't think you'd do it with DNS but you could do it with mod_rewrite. RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] Code (markup):
I take it you mean IIS (as Apache runs on Windows too). In that case ... I'm not going to be able to help, sorry. If you're new to all this and you don't have reason not to - I would suggest trying out Apache though.
I see - well there must be a way in ASP to throw out the 301 redirect headers. Yeah google "asp 301" and you should find your solution.
Thanks anyway? It's your first google result my friend. http://www.seoconsultants.com/tips/asp/301.asp But if you're too busy to click that link, <%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.seoconsultants.com/new-page.asp" %> Code (markup):
Uh, wait - I'm a jackass. That doesn't solve your problem and neither does my previous post ... not exactly at least. I'm not super-familiar with IIS ... but unless you were able to setup different virtual domains (one for www.your-domain.com and one for your-domain.com) my solution isn't really a solution. Do you know if you can setup those virtual domains? Also ... I see there are "mod_rewrite" implementations for IIS. Google "iis mod_rewrite" ... are you running your own server or hosted?
I know about that asp solution, I do it for particular pages, after I delete some page ie, I put that. But that is not what I wanted. Re the hosting, I have some on virtual dedicated, some on shared (godaddy). My problem raised after I moved to godaddy. Befere that, google see my site as one, after I moved to godaddy, my www example com has a PR4 as before, and without www it has PR0, it was not the case. And all my internal pages droped to PR0. Now, I can do this in google webmaster tools, I know, but what about other SE?
I would get in touch with GoDaddy support. It seems this can be done via IIS Admin (see http://www.webconfs.com/how-to-redirect-a-webpage.php) but whether or not GoDaddy will do this for you ... I have no idea. Good luck!