Hi! I have a MIAB machine that is working great, and is up to date. One of the domains hosted on it is a shopify store, that I’ll call mystore.com. I followed Shopify’s steps to set that up, so I don’t want to change any of those records. I’m trying to add some additional functionality to my store, using a custom API I wrote, so I’m trying to add api.mystore.com. I added this in custom DNS, but it’s been several days, and it still won’t work. When I try to access it, Chrome says api.mystore.com ’s server IP address could not be found.
Here’s a screenshot of my DNS setup, that I modified in Chrome to hide IPs and such:
Things seemingly look ok. No way to say anything more without the ability to test DNS with various tools … which cannot be done not knowing your domain name.
What does nslookup say about api.mystore.com, and can you dig it @ the box’s name server?
@timothy, @alento is right without more details it’s hard to get to the bottom of the issue.
If your old records are working correctly and the only api.. is not resolving the issue may be with upstream secondary NS not being updated by MIAB nsd, or could be the nsd itself or bind(named) - check the log files for clues:
grep -ir nsd /var/log/
grep -ir named /var/log/
you can restart the services nsd and bind9, and see if there are any errors in the logs?
nslookup on my local pc says “ubnt can’t find api.mystore.com: Non-existent domain”
nslookup on my miab server says “server can’t find api.mystore.com: NXDOMAIN”
checking nsd shows this error: “error: mystore.com.txt.signed:8: CNAME and other data at the same name” but doesn’t say anything about the api subdomain.
dig @127.0.0.1api.mystore.com +short
Returned nothing
dig @secondary_upstreem_NSapi.mystore.com +short
Returned my mail server’s IP address
dig @your_domain_registratr_NSapi.mystore.com +short
My domain is registered through google, so I think this is the same as the 8.8.8.8 below, right?
dig @8.8.8.8api.mystore.com +short
Returned nothing
After first encountering this problem, I updated MIAB and all packages before asking here, just in case. I see now that v0.4.0 is available, but I assume that’s only for Ubuntu 18.04, which I’m still planning my future upgrade to. I’m running v0.3.0. That included I think 2 reboots, so all the services should have been restarted with that.
Ok, your issue mimics an issue I was working on the other day. Can you please take a look at your admin area custom DNS page and note any custom entries specifically the CNAME entries.
I added another DNS record of api2.mystore.com and that didn’t work either, so I added ANOTHER one on another domain of mine, and that did work. So, the box DNS seems to be working. Would the CNAME pointed at the domain impact anything? That’s the only thing (that I can think of) different about it and my other domains…
Later as in in a few minutes, after I do some more stuff you tell me, or later as in with a new version of MIAB? I’m worried about downtime with my store. It doesn’t do massive sales but gets ~250 visitors/day.
After you have removed them - if successful, do another nslookup for the api. subdomain.
If unable to remove them, what is the error message?
Just a note to you and to others — it is infinitely more simple to try to troubleshoot for people if your domain name is disclosed. I understand the desire for privacy in this type of a forum, but sometimes it makes things so much simpler to trust someone else.
I believe that the CNAME is not required. To be honest I overlooked it because of your editing of the domain name.
After reviewing the Shopify Help Center it seems that the problem was the fact that you had BOTH CNAME and A records for the root domain and the www. subdomain. You need an A record for the root domain and a CNAME record for the www domain ONLY. Personally, I prefer to just use an A record as using a CNAME record requires an additional DNS lookup. The benefit of using a CNAME record is if the IP address changes only one record needs to be changed rather than potentially several.
But looking at it, mine wasn’t setup right anyways, unless that article changed after I set mine up. I had shop.myshopify.com and not shops.myshopify.com. Not that it necessarily mattered. Anyways, I’ll consider this one resolved. Thanks for your help!
Next time I have an issue, I’ll drop all the mystore secrecy stuff and just my real domain. Sorry if that caused any inconvenience with this issue.