Mobile app version of vmapp.org
Login or Join
Reiling115

: 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:

@Reiling115

Posted in: #GoogleDomains

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

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.

10% popularity Vote Up Vote Down


 

@Reiling115

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme