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

301 url redirect question

Discussion in 'Black Hat SEO' started by eNzim, May 8, 2017.

  1. eNzim

    eNzim Regular Member

    Joined:
    Feb 12, 2015
    Messages:
    219
    Likes Received:
    87
    Occupation:
    Beer Brewer
    I'm not particularly a techie type, so I apologize if this is a stupid question.

    So, I'm having a url redirection problem: I've recently purchased a domain, let's name it donordomain.com (obviously made up names) and 301 redirected it to my other site: recipientdomain.com. I used hostgator cpanel for that. Not wildcard redirect, because I wanted all pages to point to recipientdomain.com home page.

    Unfortunately the 301 doesn't work properly with subpages like donordomain.com/12345 because I get a 404 page and it doesn't redirect. How is it possible to resolve this issue?

    Found some .htacces codes on Stackoverflow, but as I mentioned befored I'm not a techie so, I have no idea what works

    Altough, there is something I could do, but I don't think this is the proper way to do it. So, I could wildcard redirect the domain and then use a 404 to 301 plugin on recipientdomain.com, but that would be a double 301, which would further weaken the power of links pointing to donordomain.com I think .

    I'd really appreciate some help because hostgator live chat reply was this:

    - That would require extensive coding, which is something that we are not able to assist with

    So, yeah, anyway thank you in advance!
     
  2. SpoonFeeder

    SpoonFeeder Senior Member

    Joined:
    Mar 19, 2017
    Messages:
    999
    Likes Received:
    788
    Gender:
    Male
    Occupation:
    SpoonFeeding & Babysitting the Noobs.
    Location:
    Click the link below if you're new to BHW!
    Home Page:
    This is the code you want on your donordomain.com's root directory's .htaccess to redirect all the subpages of donordomain.com to the recipient site's root directory.

    Code:
    RewriteEngine On
    RewriteRule ^(.*)$ http://recipientdomain.com/ [R=301]
    P.S Make sure to remove the host's redirect ie., the one you set up inside hostgator's cPanel before adding this code to .htaccess.
     
    • Thanks Thanks x 1
  3. eNzim

    eNzim Regular Member

    Joined:
    Feb 12, 2015
    Messages:
    219
    Likes Received:
    87
    Occupation:
    Beer Brewer
  4. SpoonFeeder

    SpoonFeeder Senior Member

    Joined:
    Mar 19, 2017
    Messages:
    999
    Likes Received:
    788
    Gender:
    Male
    Occupation:
    SpoonFeeding & Babysitting the Noobs.
    Location:
    Click the link below if you're new to BHW!
    Home Page:
    [​IMG]