: Can I configure Google Domains to redirect a bare domain to a subdomain over HTTPS? I'm using a "synthetic record" at Google Domains to redirect traffic from the bare domain example.com to www.example.com:
I'm using a "synthetic record" at Google Domains to redirect traffic from the bare domain example.com to example.com:
This works for requests to example.com, of which there are 4 A records that all point to Google Apps IP addresses (makes sense, that's how they handle "synthetic records" for a host name that you haven't mapped to an A record). The response to such requests is:
HTTP/1.1 302 Found
Location: www.example.com Date: Wed, 30 Sep 2015 17:08:59 GMT
Content-Type: text/html; charset=UTF-8
Server: ghs
Content-Length: 230
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
However, requests to example.com are completely ignored. There is no response from the server. Has anyone else run into this limitation with Google's implementation of redirecting a bare domain to a subdomain? Any advice for getting around this without having my own A record at the apex?
More posts by @Reiling115
2 Comments
Sorted by latest first Latest Oldest Best
It's a separate option to redirect the main domain as opposed to a subdomain. Just click on the "Add a Website" icon. First icon on the right of the domain. You will see a pop-up with an option to forward the domain.
However Google is handling this redirection service, you can't configure anything more than one subdomain to another (or bare, vice versa). This means no redirection code (301 vs 302), no installing an SSL certificate to respond over HTTPS, etc.
I'm hosting more sites at places like Heroku these days, where we don't get a static IP address and need to add a CNAME record for a subdomain. DNS doesn't typically support adding a CNAME to the bare domain, which is a good thing since it could conflict with other records on the bare domain like MX.
With all of this in mind, I'm moving more DNS over to dnsmadeeasy.com (~.49/mo) where you can setup an ANAME pseudo-record and basically get example.com and example.com to both resolve to the proper CNAME record instantly. Your server configuration can then handle redirecting all requests to www (or whatever) and forcing (or not) HTTPS.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.