I think in theory the DNS URI record type might provide a way to allow a DNS server to return a URL. See Wikipedia or RFC 7553 for details. However the clients (web browsers) would need to actually look at that record type. I have not tested/researched whether that is the case but I suspect it may not be very common.
Otherwise pure DNS is not able to do what you want. And deSEC only offers DNS, nothing else.
Note: Some providers offer such services by actually doing HTTP redirects. That means the request goes to a web server of the provider first (where it might be tracked), which then answers with the appropriate HTTP Status code and a Location: header containing the destination URL. You could set this up yourself for your sites if you wanted to.
@markus, for the HTTPS record type which is now supported by a significant share of the market, browsers have to query the HTTPS record and process it. That’s what they actually do. What they don’t do is processing URI records, which is what @fiwswe was discussing in their post.
While some browsers may already make use of this new record type the specification is still in draft form, not an accepted RFC.
Additionally skimming through the draft, I don’t see any way this could be used to specify a URL (or at least a hostname + path), which was what @keat was looking for. But maybe I’m missing something here?
@keat
It seems you already have a web server handling your target domain2.com/something/ All you need to do is to configure this web server to additionally listen for requests to domain.com, then make it do a HTTP redirect to your real destination. Create A/AAAA records to point domain.com to the IP of your web server and you’re basically set.
If your web server is using Apache httpd you could implement this using e.g. VirtualHosts and mod_rewrite. But there other methods as well.
A) $100/year seems excessive. You could get this cheaper You could even set up a machine at home to handle this redirection service. Just point your A/AAAA record for domain.com to your DDNS address and set up your service.
B) Unless I misunderstood your original request, you already have a webserver hosting domain2.com/something/. Just use that Webserver to host the redirect service at no extra cost.
Its my mums email for her health business and if anyone types in the url it just redirects to a medical site for a clinic she works for and doesn’t own the domain.
Simple stuff like this is why the internet isn’t the sovereign control utopia that everyone’s thinks it could be. Getting a reliable home internet connection for a business use case will cost more than just paying someone for hosting.