301 Redirect Question

Discussion in 'Search Engine Optimization' started by walshy, Nov 9, 2006.

  1. #1
    I have an issue where I believe we are being penalised in the SE's because of the fact we have registered a .com and a .co.uk and the .com is aliased to the .co.uk so we could be triggering some kind of duplicate content penalty.

    Would it be best to use .htaccess to handle the redirect or could we simple use some PHP as follows. . .
    
    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.new-url.com" );
    ?>
    Code (markup):
    Would the above method be classed as SE friendly?
     
    walshy, Nov 9, 2006 IP
  2. kerouac3001

    kerouac3001 Peon

    Messages:
    92
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes, it's SEF.
     
    kerouac3001, Nov 9, 2006 IP
  3. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it would be but you can do this better.

    use a .htaccess file to rewrite EVERY page on one site to the other. the code you have will only work for each specific file you put that in. if you just put that on the homepage, the subpages will still be there, which isn't something you want.
     
    disgust, Nov 9, 2006 IP
  4. chovy

    chovy Peon

    Messages:
    181
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    there's no difference in the end result between htaccess and php redirecting, the header produced is the same.

    I've noticed pagerank not being applied to my 301's as well....which makes me question the idea behind them.

    For example, a new site of mine I redirect all www to no www, and always has since I pushed the site live...however, I still see residual pagerank on the www domain and not on the "no www" domain.
     
    chovy, Nov 9, 2006 IP
  5. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #5
    there is a difference. you can't place (well, can't easily place...) a redirect on non-php files, for example. you can't redirect a pdf or a jpg or an mp3.

    what I was mostly afraid of was that he was only directing the homepage to the homepage on the other domain, which is not enough. you need every page on the site to redirect to the other domain.

    also the reason you haven't seen the pagerank change is because pagerank updates don't happen all of the time. in fact, they happen quite rarely.
     
    disgust, Nov 9, 2006 IP
  6. walshy

    walshy Banned

    Messages:
    124
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the advice disgust but at the moment there is nothing at all on the .com it just uses the hosts "alias" facility to mirror the content of the .co.uk. So when you visit the .com you see everything you would see if you had visited the live .co.uk site.

    My concern was Google and other SE's seeing this as duplicate content as we are strugling to gain any traction in the SERPS and both the .com and .co.uk are listed in Google. Things did improve when we submitted sitemap but I was worried this could be considered dupe content.

    I have implemented the PHP redirect so fingers crossed it helps the .co.uk
     
    walshy, Nov 9, 2006 IP