Reputation: 33
Im using google cloud platform to host my website. I have spinned up VM, i have two docker containers, one is for the UI and other one is for backend. I have added A record, pointing to my VM - webpage loads correctly, no problems. Did a little bit digging on google, and wanted to accomplish pointing the backend to specific subdomain - e.g api.domain.com, so I added SRV records as well, as this isn't running on port 80, but 6009 instead. My SRV records look something like this. DNS Name: _http._tcp.domain.com TTL: 300 Data: 0 5 5006 api.domain.com
Why is it not working, can anybody tell me what i've been doing wrong or does it just take time to actually show up? It's been nearly 7 hours now.
Upvotes: 0
Views: 825
Reputation: 81386
I think that you are misunderstanding what DNS SRV records are for. You can create any SRV record you want, but you will need to use clients that are programmed to look for your SRV record. The standard web browsers are not going to lookup your SRV record to see if you are using a different port from 80 (HTTP) or 443 (HTTPS).
If you are using custom software in your web server to access your API backend, then your software will need to lookup the SRV record and resolve the entries.
Upvotes: 1