1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I can't get 301 REdirects to work. Can I try this instead.

Discussion in 'Black Hat SEO' started by greggggg, Mar 30, 2012.

  1. greggggg

    greggggg Regular Member

    Joined:
    Apr 24, 2011
    Messages:
    383
    Likes Received:
    21
    I have not be able to get a 301 redirect to work recently. I want to redirect domain a to domain b and get htem to switch positions in the serps. What happens is that only domain a falls off and domain b remains the same.

    This is the code I am using in the htaccess files of website a

    Options +FollowSymLinks
    Options +SymLinksIfOwnerMatch
    RewriteEngine on
    RewriteRule (.*) http://www.newwebsite.com/$1 [R=301,L]



    I have not had any luck with this recently and i haven't had a problem before. Is my code correct?


    Since I can't get the sites to switch and I want the content from Site B to be found instead, can I try this. I am thinking about building essentially a landing page and have the user click a enter here button and that button will take them to the home page of the site I want them to be at. Will this hurt my rankings much if it at all?

    I've been struggling with this for a few weeks now and any help is appreciated.
     
  2. AuraObscene

    AuraObscene Junior Member

    Joined:
    Nov 28, 2011
    Messages:
    103
    Likes Received:
    17
    Search for meta refresh that should work for you.
     
  3. bobbylove321

    bobbylove321 BANNED BANNED

    Joined:
    Nov 8, 2008
    Messages:
    1,987
    Likes Received:
    2,198
    If I am understanding correctly, you want to do this:

    Add this code as the first line of the header.php in wordpress before any other line of code:

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

    greggggg Regular Member

    Joined:
    Apr 24, 2011
    Messages:
    383
    Likes Received:
    21
    Can you explain what this does or what the name is so I can read more about it please
     
  5. JMamba

    JMamba Junior Member

    Joined:
    Feb 23, 2012
    Messages:
    103
    Likes Received:
    17
    You replace new-url.com with the site where you want the current domain to redirect to. So if you put this code on the very first line in your header file, let's say it was on site A, and the url in the code points to site B....

    Once the code is in place, whenever you type in site A's domain in Google's search bar, this will automatically redirect to site B via 301 permanent redirect.

    It's very easy, just google "301 redirect" if you want to read more about it.