View Full Version : how to correct this? 301 redirect
acc
June 25th, 2008, 11:59 AM
did this website grader and it has this note:
Permanent Redirect Not Found Search engines may think www.url.com and url.com are two different sites.You should set up a permanent redirect (technically called a "301 redirect") between these sites. Once you do that, you will get full search engine credit for your work on these sites.
I know 301 redirect, when it comes to pages, but don't really know how to go about this.
where do i place the redirect lines and how do I query if they entered www.url.com or url.com?
thanks
actionAction
June 25th, 2008, 12:07 PM
Create an .htaccess file and put this in it. Obviously change url.com to your domain:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^url.com [NC]
RewriteRule ^(.*)$ http://www.url.com/$1 [L,R=301]
Templarian
June 25th, 2008, 12:07 PM
search .htaccess 301 redirect in google
//edit, or do what it says above..
acc
June 25th, 2008, 12:16 PM
server is IIS (ASP) and when I was looking for info, correct me if I am wrong, that it cannot run .htaccess file
actionAction
June 25th, 2008, 12:34 PM
You are correct, stupid IIS. Anyway, this link, though very old might help you: http://www.xoc.net/works/tips/domain.asp
If you are on shared hosting, you may need to contact your hosting provider to have this done.
acc
June 27th, 2008, 09:38 AM
would you suggest something like this? though I would have to put in every page, but is it an option?
<%@ Language=VBScript %>
<%
If InStr(Request.ServerVariables("SERVER_NAME"),"www") = 0 Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.sitename.com"
Request.ServerVariables("HTTP_HOST")
Request.ServerVariables("SCRIPT_NAME")
End if
%>
icio
June 27th, 2008, 11:30 AM
If you had set your DNS records up properly this wouldn't be a problem.
acc
June 27th, 2008, 11:52 AM
actually, I didn't set it up and I don't have access to the settings, it's a company site. I would have to tell admin to do it.
icio
June 27th, 2008, 03:14 PM
If they're employing someone to handle it, tell him to do his damn job.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.