Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Redirect all domains to" always redirects to "http://" url, causing unnecessary redirect chain #1858

Open
khromov opened this issue Aug 28, 2023 · 0 comments

Comments

@khromov
Copy link

khromov commented Aug 28, 2023

Is your feature request related to a problem? Please describe.
When you enable "Redirect all domains to" and set it to a domain that has HTTPS enabled, the redirect still goes to the http version of the domain. This causes an unnecessary redirect chain that search engines like Google do not like.

Here is a setup example. I'm trying to redirect the "www" subdomain to the root domain. The root domain has HTTPS enabled.

2023-08-28 19_58_48-CapRover _ Server Dashboard — Mozilla Firefox

When curling the www domain, we get:

curl https://www.DOMAIN.chat --HEAD
HTTP/2 302
server: nginx
...
location: http://DOMAIN.chat

As we can see http:// is used. Then when going to the http:// URL another redirect happens to go from http => https.

Describe the solution you'd like
If "Enable HTTPS" is enabled for the target domain, the redirect should go to the https version directly.

Describe alternatives you've considered
Not sure.

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant