Redirect a page for google page rank?
#1
Hi

I have a page, for instance domain.com/index.html

and I would like to redirect it to domain.com/directory/index.html

Right now I have an html "meta refresh" redirect, but I know that search engines such as google dont like these; they think that you are creating portals.

So what is the correct way to redirect?

Also, will the Page Rank of the page get transfered?

Thanks

Zach
Reply
#2
I wonder *why* you want to add "directory" in there. If you redirect it in the setup of the server (if you have access to that - or to someone who has access), rather than redirecting, wouldn't that be better?
Reply
#3
penguinmama Wrote:I wonder *why* you want to add "directory" in there. If you redirect it in the setup of the server (if you have access to that - or to someone who has access), rather than redirecting, wouldn't that be better?

The directory is a script which is runinng on the server, and I do not have access to it.
Reply
#4
Ah, bummer. How about frames? How does that affect the search engine thing? Then it would be accessed THROUGH the domain, still...
Reply
#5
This has me completely confused. But I am looking forward to finding the answers. Hopefully, someone clears this up for us all.
Reply
#6
OK this is it:

Its called a 301 Redirect. It conserves your PR and tells search engines you have moved.


Quote:IIS Redirect

  • In internet services manager, right click on the file or folder you wish to redirect
  • Select the radio titled "a redirection to a URL".
  • Enter the redirection page
  • Check "The exact url entered above" and the "A permanent redirection for this resource"
  • Click on 'Apply'
Redirect in ColdFusion

<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.new-url.com">

Redirect in PHP

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-url.com" );
?>

Redirect in ASP

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently" Response.AddHeader "Location", " http://www.new-url.com"
>

Redirect in ASP .NET

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Please REPLACE http://www.newdomain.com in the above code with your actual domain name.
In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.
Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Redirect to www (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to http://www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
Please REPLACE domain.com and http://www.newdomain.com with your actual domain name.
Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
Reply
#7
That is really really cool! Keeping PR is SOOO important in our world of searches engines. This information is sure to come in handy for many of us.
Reply
#8
Wow, thanks, Zach! I didn't realize that was even possible. I see there isn't an HTML version. Can this be done in ordinary HTML?
Reply
#9
penguinmama Wrote:Wow, thanks, Zach! I didn't realize that was even possible. I see there isn't an HTML version. Can this be done in ordinary HTML?


I don't link so.

After server side code, you are left with metarefersh:

Code:
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://www.somacon.com/">
</head>
<body>
This page has moved to <a href="http://somacon.com/">http://somacon.com/</a>
</body>
</html>

or javascript:

Code:
<html>
<head>
<script type="text/javascript">
window.location.href='http://www.somacon.com/';
</script>
</head>
<body>
This page has moved to <a href="http://somacon.com/">http://somacon.com/</a>

</body>
</html>

But as you can see, none of these indicate a 301 Status code. It then dosen't communicate to search engines that you have permanentely moved the resource/page. It can even make you look like a portal and hence lose in the rankings.
Reply
#10
Thats really cool.
But how do i do 301 request?
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Google Domains pricing and supported TLDs Williamhawk 0 1,784 12-15-2017, 05:14 AM
Last Post: Williamhawk
  Need help with SMTP for Contact Us page Williamhawk 0 1,622 12-12-2017, 05:13 AM
Last Post: Williamhawk
  Any good service for Google Apps deployment and support? MatterEnergy 3 2,465 10-26-2017, 01:04 PM
Last Post: Glaceptra
  PR ~ Page Ranking Ceruleah 13 10,080 02-26-2007, 06:46 PM
Last Post: -thoma-

Forum Jump:


Users browsing this thread: 1 Guest(s)