|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
hi,
i asked my hosting-provider to make a 301 permanent redirect from visitnatalbrazil.com to www.visitnatalbrazil.com and this for SEO-purpose. My hosting-provider says i'm the first one who ask him this.. What is the best way to do this and can he charge me an extra cost for this? |
|
||||
|
It's really quite simple.
Your host would merely have to set up visitnatalbrazil.com as a new site and initially point it to the same folder as www.visitnatalbrazil.com . When they've done that, they need to visit the Properties of the visitnatalbrazil.com site, and click the Home Directory tab. There's an option there to redirect to a URL, which they would pick and type in http://www.visitnatalbrazil.com and check the "A permanent redirection for this resource" box. That's it. They can charge you for anything they want, and since this is non-standard they might. I can't say for sure, although it's about a two-minute job in IIS.
__________________
Toronto Web Design | Search Engine Friendly, Standards-Compliant Layouts | Walk on my Path (my blog) |
|
||||
|
You should never need to redirect domain.com to www.domain.com.
If domain.com is not appearing and www.domain.com is then your host has misconfigured your dns settings. Your dns settings should have an A record for both domain.com and www.domain.com Doing a dnsreport on your site throws up a lot more problems than a missing A record, you need to get your host to sort out their server, nameservers and dns, it is an absolute mess. http://www.dnsreport.com/tools/dnsre...atalbrazil.com |
|
||||
|
He might for SSL reasons.
__________________
Toronto Web Design | Search Engine Friendly, Standards-Compliant Layouts | Walk on my Path (my blog) |
|
||||
|
Quote:
A properly configured domain will have A records for both the domain.com and the www.domain.com so even when using a secure cert https://domain.com and https://www.domain.com are exactly the same site and will serve the same security certificate. |
|
||||
|
Code:
Dim Domain, URL
Domain = Request.ServerVariables ("HTTP_HOST") ' Gets the domain name.
URL = Request.ServerVariables ("URL") ' Gets the current URL.
if InStr (Domain, "www") = 0 then
URL = "http://www." & Domain & URL ' Concatenates the URL to the domain
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", URL
end if
Response.Write Domain & URL ' You can remove this if you want. This just adds a check at the end.
Try it here: http://searchenginefriendlylayouts.com/test_domain.asp (I intentionally removed the www).
__________________
Toronto Web Design | Search Engine Friendly, Standards-Compliant Layouts | Walk on my Path (my blog) |
|
|||
|
Hello Adam,
thanks for the script. i implemented it and it gives back the correct server header, without help of my host. just one remark: http://visitnatalbrazil.com redirects to http://www.visitnatalbrazil.com/index.asp and not to http://www.visitnatalbrazil.com/ Is this OK regarding the passing through of linkpopularity to http://www.visitnatalbrazil.com/ ? thanks again for the help. |
|
|||
|
Quote:
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |