Results 1 to 14 of 14
  1. #1
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default SSL For Redirected Domain

    How do you handle ssl certs for a redirected domain? Eg: https://www.olddomain.com to https://www.newdomain.com

    Without ssl on olddomain.com the user gets a security error before the redirect but let's encrypt doesn't seem to let you set up or renew a certificate for a redirected domain, even if the server IP is the same (ie: if olddomain.com redirects via a htaccess file stored on the same IP as newdomain.com).

    I can get around it by temporarily removing the redirect to set the certificate up and then putting it back afterwards, but in that scenario it won't renew so you're stuck doing it long term which doesn't seem like a viable option.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  2. #2
    Aaron's Avatar
    Aaron is offline Private Member
    Join Date
    October 2020
    Location
    New Zealand
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I have the similiar problem with SSL, i started new website, but before my domain become https i have fixed some backlinks on http version. i have redirect now, but what do you think guys, should i changed links into https or just leave it as it is?

  3. #3
    gil.langelaan's Avatar
    gil.langelaan is offline Private Member
    Join Date
    July 2018
    Location
    Johannesburg
    Posts
    965
    Thanks
    110
    Thanked 307 Times in 243 Posts

    Default

    301 redirect and wait

  4. #4
    Michael Martinez is offline Public Member
    Join Date
    March 2017
    Location
    USA
    Posts
    79
    Thanks
    9
    Thanked 55 Times in 31 Posts

    Default

    You could try aliasing the domain. I've got some aliased domains that Cpanel assigned Comodo certificates to. The alias implements a 301 redirect without requiring a hosting account (or setting up an Addon domain).

    I don't know if Let's Encrypt would facilitate that.

  5. #5
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default

    Quote Originally Posted by Aaron View Post
    I have the similiar problem with SSL, i started new website, but before my domain become https i have fixed some backlinks on http version. i have redirect now, but what do you think guys, should i changed links into https or just leave it as it is?
    This isn't really the same thing as I was talking about. But yeah, just redirect. Google have said they don't drop juice from a http to https redirect.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  6. #6
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default

    Quote Originally Posted by Michael Martinez View Post
    You could try aliasing the domain. I've got some aliased domains that Cpanel assigned Comodo certificates to. The alias implements a 301 redirect without requiring a hosting account (or setting up an Addon domain).

    I don't know if Let's Encrypt would facilitate that.
    It's not cpanel so that's not an option (on a VPS on digital ocean).

    What I ended up doing was removing the redirect so I could issue the SSL cert and then added it back in. I'm hoping that when the time comes it'll renew as it resolves to the same IP.

    I have SSLs set up this way from sites that have been redirected and where the SSL was set up when the site was live and it does seem to renew, but not 100% if that'll work long term.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  7. #7
    universal4's Avatar
    universal4 is offline Forum Administrator
    Join Date
    July 2003
    Location
    Courage is being scared to death...and saddling up anyway. John Wayne
    Posts
    34,119
    Thanks
    4,577
    Thanked 9,336 Times in 6,012 Posts

    Default

    Quote Originally Posted by baldidiot View Post
    It's not cpanel so that's not an option (on a VPS on digital ocean).

    What I ended up doing was removing the redirect so I could issue the SSL cert and then added it back in. I'm hoping that when the time comes it'll renew as it resolves to the same IP.

    I have SSLs set up this way from sites that have been redirected and where the SSL was set up when the site was live and it does seem to renew, but not 100% if that'll work long term.
    Sounds like the most logical method to fix it.

    My guess the renewal may or may not work as planned unless the hostname matches. If you are using the dns method of auth, it would probably be ok, (most difficult method to get working) but usually for auth the hostname needs to answer.

    Rick
    Universal4

  8. #8
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default

    Quote Originally Posted by universal4 View Post
    My guess the renewal may or may not work as planned unless the hostname matches. If you are using the dns method of auth, it would probably be ok, (most difficult method to get working) but usually for auth the hostname needs to answer.
    That's what I was worried about, would be annoying having to muck about to renew.

    Having said that I just tried a manual renewal of the certificate and it worked fine even with the redirect in place so maybe it will work long term.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  9. #9
    Former Member 7 is offline Former Member
    Join Date
    January 2019
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You will need to keep the SSL certificate for the domain you want to redirect until google has fully crawled and updated all the pages it’s indexed.

    Then 301 redirect the https:// and all other versions of the domain to the new one via the htaccess. Simple domain forwarding won’t work for this one.

  10. #10
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default

    Quote Originally Posted by gamblinvest View Post
    You will need to keep the SSL certificate for the domain you want to redirect until google has fully crawled and updated all the pages it’s indexed.
    The point of the thread is more how to keep the SSL cert when it's redirected as the domain won't verify with the redirect in place.

    It also needs to be done long term if the site has existing traffic / organic links - the users need the ssl cert long term otherwise they'll get a warning if they try to visit via old links, bookmarks etc..
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  11. #11
    Former Member 7 is offline Former Member
    Join Date
    January 2019
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You'll have to have the site hosted on your server as usual with the SSL installed. Delete all the files but keep the .htaccess.

    Add this code to the .htaccess file, replace with the relevant domains and change 'ext' to the domain extension you're using on the old and new.

    RewriteCond %{HTTP_HOST} ^olddomain\.ext$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.olddomain\.ext$
    RewriteRule ^/?$ "https\:\/\/newdomain\.ext\/" [R=301,L]

  12. #12
    baldidiot is offline Private Member
    Join Date
    January 2010
    Posts
    5,100
    Thanks
    433
    Thanked 2,333 Times in 1,555 Posts

    Default

    You'll have to have the site hosted on your server as usual with the SSL installed. Delete all the files but keep the .htaccess.

    Add this code to the .htaccess file, replace with the relevant domains and change 'ext' to the domain extension you're using on the old and new.

    RewriteCond %{HTTP_HOST} ^olddomain\.ext$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.olddomain\.ext$
    RewriteRule ^/?$ "https\:\/\/newdomain\.ext\/" [R=301,L]
    You can't issue a new certificate with a redirect like that in place, it just fails.

    What I ended up having to do (mentioned earlier in the thread) is remove the redirect to issue the SSL and then put the redirect back.

    The issue here though is renewing the certificate. I've tested it with a manual renewal and it did work so crossing fingers here that it'll last long term but if it ever doesn't renew it needs to have the redirect removed to reinstall the SSL which seems like a bit of a faff.

    That's the point of the thread really - how to set up a new SSL on a redirected domain, not how to do the redirect itself.
    onlinegamblingwebsites.com - Formally known as goodbonusguide.

    Gambling Domains: Small clear out of some of the domains we've been hoarding - see the spreadsheet here.

  13. The Following User Says Thank You to baldidiot For This Useful Post:

    universal4 (30 January 2021)

  14. #13
    universal4's Avatar
    universal4 is offline Forum Administrator
    Join Date
    July 2003
    Location
    Courage is being scared to death...and saddling up anyway. John Wayne
    Posts
    34,119
    Thanks
    4,577
    Thanked 9,336 Times in 6,012 Posts

    Default

    Quote Originally Posted by baldidiot View Post
    You can't issue a new certificate with a redirect like that in place, it just fails.

    What I ended up having to do (mentioned earlier in the thread) is remove the redirect to issue the SSL and then put the redirect back.
    Agreed, as stated earlier, the HOST NAME must answer, not redirect to a different host name.

    You might want to investigate authorization by a dns record, which if I recall is the only method that would answer the auth request outside of the web server's response.

    Rick
    Universal4

  15. #14
    Aaron's Avatar
    Aaron is offline Private Member
    Join Date
    October 2020
    Location
    New Zealand
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks, also my domain is https://www.example but few backlinks going to my site with https://example without www and ahrefs is showing redirect, do i loose juice here and should i edit these links to be like my real domain is?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •