aws-amplify / aws-amplify/amplify-hosting

Redirects from your root domain to www does not work

Open
#2,527 28 comments 0 reactions 0 assignees View on GitHub
custom-domain usability
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked the [custom domains troubleshooting guide](https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### App Id

Let me know if it matters

### Region

us-east-1

### Step

Domain Redirects

### Status

Partial failure

### Issue or question

My SEO is getting wrecked because we don't have a functioning domain for https://domain.com.

The https://www version works fine, as well as the http:// and http://www. version, but https:// on its own gets either `ERR_CONNECTION_TIMED_OUT` or `ERR_CONNECTION_REFUSED` depending on what configuration of redirect rules I have.

Right now we have the following configuration. I've tried multiple other approaches like removing the root domain from domain management and trying to rely just on redirects, I've also tried using alternative redirect types like 200 (rewrite) and 301 (permanent).

Nothing's working.

### Error message

`ERR_CONNECTION_TIMED_OUT` / `ERR_CONNECTION_REFUSED`

### Additional information

![Screenshot 2022-01-20 at 17 27 33](https://user-images.githubusercontent.com/19807881/150390850-ffd9f760-7124-468c-bed8-cfda5b444c3e.png)
![Screenshot 2022-01-20 at 17 27 38](https://user-images.githubusercontent.com/19807881/150390855-7461e694-8e10-41c7-8a36-80e54c91b275.png)

Contributor guide

Open the contributing guide

Research direction

Start with the Domain Redirects configuration and the linked custom-domain troubleshooting guide. Compare the root HTTPS behavior with the working www, HTTP, and HTTP-www variants, using the reported ERR_CONNECTION_TIMED_OUT and ERR_CONNECTION_REFUSED results. Done means the root HTTPS domain reliably redirects without connection errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.