Score:0

Is it possible to have conditional Route 53 DNS records based on URL path?

ng flag

Problem: migrating support articles from HelpScout to Zendesk. I want to set up a list of 301 redirects.

Example: 301 Redirect: https://support.domain.com/hs/article/1234-Problem-Help to: https://support.domain.com/zn/article/1234-Problem-Help

The problem is, Zendesk requires a CNAME record of support.domain.com to point to myaccount.zendesk.com

Zendesk also does not offer any redirect services on their side.

I have a server where I can host support.domain.com and have all of the redirects in place in an .htaccess file. However, the domain is CNAME'd over to Zendesk.

What I need is a solution that would look at the URL path and any path that begins with "/hs/" to use a DNS A record to an IP address of my server and any URL path that begins with "/zn/" to use a DNS CNAME record to myaccount.zendesk.com

Is this possible? DNS is currently using Route 53.

vn flag
DNS has no concept of URLs. This can't be done in this way. You might be able to use a proxy server to sort of accomplish this, but complex apps not under your control can be challenging to successfully proxy. I'd be looking at something like `zn.support.example.com` being pointed to Zendesk, and `support.example.com` being pointed to your server.
sugapablo avatar
ng flag
This was the only solution I had come up with. I was hoping for another.
vn flag
What's the issue with the `zn.support.example.com` approach?
sugapablo avatar
ng flag
Client wants the same domain.
vn flag
Then this is one of those times you point out to the client that they hire an expert instead of DIYing it for a reason.
sugapablo avatar
ng flag
They have accepted this reality.
Score:-1
pl flag

No, but you can use a server like Nginx or Apache to accomplish this. If you need an example of what an Nginx config would look like for this please let me know and I'll edit this post with it.

ws flag
...or just about any other reverse proxy software including Amazon ELB (since you're already using AWS for DNS)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.