Subdomain Redirect HTTPS?

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
User avatar
SG-17
New to forums
New to forums
Posts: 4
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Mar 01, 2024 6:07 am
Contact:

Subdomain Redirect HTTPS?

Post by SG-17 »

So I set up a subdomain as a redirect to another page on my website and on some browsers it's getting hung up as insecure as the subdomain is apparently showing as http for the split second before it starts to load the target page. Being set up as a redirect blanks out the https option.

Is there a way to resolve this short of changing the subdomain to a folder and using an html redirect index page?
User avatar
Edge100x
Founder
Founder
Posts: 13045
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Subdomain Redirect HTTPS?

Post by Edge100x »

If you want to be able to distribute the https:// link for that subdomain and have it redirect properly, you may need to set it up as a Folder type and have a redirect in the .htaccess file. This should allow LE to work properly with it, as long as you carve out the ".well-known" folder.

So the .htaccess would look something like this:

Code: Select all

  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/.well-known/
  RewriteRule ^ https://your.redirect.target [R=302,L]
User avatar
SG-17
New to forums
New to forums
Posts: 4
Joined: Fri Mar 01, 2024 6:07 am
Contact:

Re: Subdomain Redirect HTTPS?

Post by SG-17 »

Thank you, that worked great!
Post Reply