I've read Heroku's documentation:
http://devcenter.heroku.com/articles/custom-domains#wildcard_domains
They say to add:
To use with a custom domain, configure your DNS registrar to point *.yourdomain.com at yourapp.heroku[app].com.
In GoDaddy, you can't do:
*.yourdomain.com
in the name field. I've heard you can get around that by doing:
**
However, I tried that, but it's not working.
When I run this in console:
host anysub.yourdomain.com
I get:
Host anysub.yourdomain.com not found: 3(NXDOMAIN)
What could be the problem? I'm guessing the wildcard isn't set up in GoDaddy correctly?
(FYI: I swapped out yourdomain.com for my actual domain.)
One GoDaddy Wildcard Certificate secures unlimited servers and subdomains, all from a single dashboard.
Log in to your Godaddy account. Click on SSL certificates and then click on 'Manage'. Next click on the 'View Status'. Click on 'Manage' and then click on “Re-Key certificate “Paste the full CSR into the SSL request area in your account and click on 'SAVE'.
Wildcard SSL certificates secures your website URL and an unlimited number of its subdomains. For example, a single Wildcard certificate can secure www.coolexample.com, blog.coolexample.com, and store.coolexample.com.
A SSL/TLS Wildcard certificate is a single certificate with a wildcard character (*) in the domain name field. This allows the certificate to secure multiple sub domain names (hosts) pertaining to the same base domain. For example, a wildcard certificate for *. (domainname).com, could be used for www.
Go to GoDaddy's DNS Manager, the first table on top should say A(Host), click the button under that first table that says Quick Add. In the first text field, enter an asterisk (*), in the second one, the IP address to redirect to (the same one you have for the @ record on top). Click "Save Zone File" on top-right and confirm.
This creates a catch-all record to anysub.yourdomain.com
.
Good luck.
I just tried it today and it seems that it's now possible to create wildcard cnames in GoDaddy.
GoDaddy > ... > DNS Manager -> Zone File Editor (Edit Zone)
Then under CNAME (Alias) panel > Quick Add
Host: *
Points to: yourapp.herokuapp.com
Or
Host: *.dev.herokuapp.com
Points to: yourapp.herokuapp.com
Then click on "Save Zone File" and wait a few minutes.
I remember getting this "Host not found 3(NXDOMAIN)" error myself not so long ago. Not anymore. Any subdomain other than those listed explicitly in either A or CNAME are redirected as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With