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

How can I redirect a redirect to https?

Discussion in 'White Hat SEO' started by UnDerDoG81, Feb 28, 2017.

  1. UnDerDoG81

    UnDerDoG81 Power Member

    Joined:
    Oct 29, 2009
    Messages:
    542
    Likes Received:
    82
    Hi,

    3 weeks ago my old joomla 1.5 website got hacked once again. So it was time to move forward. Since some subpages have backlinks, I need to redirect them. I switched to wordpress and redirected all old joomla urls (about 50) with .htaccess to the new wordpress urls wich looks like this actually:

    Code:
    Redirect 301 /joomla/subpage.html http://www.mydomain.com/subpage
    Now a new problem comes up, I want to switch my webhoster and enable https. So how should I redirect all this now without losing linkjuice and rankings? I guess the following will not work:

    Code:
    Redirect 301 /joomla/subpage.html https://www.mydomain.com/subpage
    Since the old URL is
    Code:
    http://www.mydomain.com/joomla/subpage.html
    and I guess when I only use
    Code:
    /joomla/subpage.html
    it just redirects from
    Code:
    https://mydomain.com/joomla/subpage.html
    ?

    Or can I use this too:

    Code:
    Redirect 301 http://mydomain.com/joomla/subpage.html https://www.mydomain.com/subpage
    And another problem is, I already built links to the new wordpress urls. How will these be redirected?
     
  2. validseo

    validseo Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 17, 2013
    Messages:
    906
    Likes Received:
    521
    Occupation:
    Professional SEO
    Location:
    Seattle, Wa
  3. UnDerDoG81

    UnDerDoG81 Power Member

    Joined:
    Oct 29, 2009
    Messages:
    542
    Likes Received:
    82
    Yes I know this but will the joomla redirects with links also be redirected to https? And how much link juice will I lose with Joomla 301 to wordpress -> 301 to https -> new URLs
     
  4. validseo

    validseo Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 17, 2013
    Messages:
    906
    Likes Received:
    521
    Occupation:
    Professional SEO
    Location:
    Seattle, Wa
    Yes you can use rewrite rules too. It is generally considered very risky to do HTTPS migration at the same time as a URL format change and at the same time as a platform change. You are basically turning everything upside down all at once.

    And there is no HTTPS boost. Or it is so small as to not be measurable in the results. So if your are migrating to HTTPS you should be doing it because you have a specific requirement that mandates doing so, like securing your customer's shopping experience. If so then the "link juice" doesn't matter and you can boost your SEO in other ways later to recover. Or you could do it because you are changing everything else and why not since there is going to be chaos no matter what you do.

    In general the net effect of HTTPS migration has been notably negative... meaning that most accounts incurred substantial losses in rankings in the months following the move. (for whatever reasons ... I know some people who didn't have issues too.)

    I can't speak to the internals of joomla, but the apache redirect behaviors should happen first at the time the request protocol is communicated to the server. Once the webserver hands off the request then any application specific (joomla) handlers can process it.

    You will likely need to go in and change your application content... navigation, footers, other links to use the HTTPS form. You will also need to update your sitemaps, RSS feeds, product feeds, PPC ad URLs. You will need to set your HTTPS preferences in GSC and make sure your have verified the HTTPS urls as well. You also need to set the HTTPS URL as the canonical URL for each page. And once complete resubmit your sitemaps.

    There are a number of good guides and checklists for HTTPS migrations you can google.

    Once you have mechanically migrated then you find 404 errors in GSC for URLs you missed creating redirects for and you redirect those to appropriate pages. It totally sucks, but those are orphaned backlinks. You are allowed to redesign your website, but what you never ever want to do is change your URL structure. It will be painful to do it this time but just be sure you never have to do it again and be super strict about it.
     
    • Thanks Thanks x 1
    Last edited: Feb 28, 2017
  5. UnDerDoG81

    UnDerDoG81 Power Member

    Joined:
    Oct 29, 2009
    Messages:
    542
    Likes Received:
    82
    Thanks for your reply. Sounds like a stupid idea to go for https. Yes, you are right, a guy in the niche I am was ranking for over 8 years rocksolid on #1 for a 30k keyword. He switched to https and now his site is hovering between page 1 p6 to 10 and page 2 of google for over 4 months now. My site is a affiliate site and I´ve read that https will become a must, so I thought I´ll go for it. But if I lose my rankings, nope.
     
  6. validseo

    validseo Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 17, 2013
    Messages:
    906
    Likes Received:
    521
    Occupation:
    Professional SEO
    Location:
    Seattle, Wa
    Exactly... don't be first... be certain. :)
     
  7. UnDerDoG81

    UnDerDoG81 Power Member

    Joined:
    Oct 29, 2009
    Messages:
    542
    Likes Received:
    82
    One more question. How important is it to add a / at the end of the domain name when I do a redirect?

    For example I did this:

    Code:
    Redirect 301 /blabla.html http://www.mydomain.com
    But when I copy my domain out of the browser. it usually has an / at the end like
    Code:
    http://www.mydomain.com/
    . Does that matter? Should I add that in the .htaccess?

    And why does
    Code:
    Redirect 301 http://www.mydomain.com/blabla.html http://www.mydomain.com
    not work? Why does it have to be
    Code:
    Redirect 301 /blabla.html http://www.mydomain.com
    Since I want to use https now (anyway) and I am not sure what will happen when I do this with the redirects? What I mean is, when I do a redirect like this
    Code:
    Redirect 301 /blabla.html http://www.mydomain.com
    will it be reidrected from
    Code:
    http://mydomain.com/blabla.html
    or from
    Code:
    https://mydomain.com/blabla.html
    ? If it will be redirected with https I guess I will lose my backlinks to that subpage then?
     
    Last edited: Mar 9, 2017