ttugates
ttugates

Reputation: 6291

How to configure URL Redirect in Azure DNS Zone

We have multiple websites under Azure DNS Zone

ourbusiness.net

Given multiple Web Apps like So:

foo.ourbusiness.net

bar.ourbusiness.net

We would like to add URL redirects(Correct term?) such that navigation to the following:

foos.ourbusiness.net

thafoo.ourbusiness.net

morefoo.ourbusiness.net

all redirect to:

foo.ourbusiness.net

Would need the same for other apps like bar, baz etc, not just foo.ourbusiness.net.

We do not want an alias, the browser navigation needs to navigate to foo.ourbusiness.net in the browser URL.

I think it is possible using a combination of multiple A Records and a Ptr record. This would require a static IP or Virtual IP address(however that works.)

We use SSL.

What is the most direct way to accomplish above requirement in Azure? Thx..

Upvotes: 2

Views: 14126

Answers (2)

garbrad
garbrad

Reputation: 241

Based on this requirement "We do not want an alias, the browser navigation needs to navigate to foo.ourbusiness.net in the browser URL." you need a HTTP redirect to tell the browser to navigate to a different address, i.e. foo.ourbusiness.net. That's not provided by Azure DNS but you could look at something like Azure Functions to create a HTTP reply with the correct HTTP return code etc.

Upvotes: 0

Sa Yang
Sa Yang

Reputation: 9401

According to your request, I think the most direct way is to set multiple A records.

It does need a IP address for the Web App and this solution need some cost. However,

NOTE: The IP address may change if you delete and recreate your web app, or change the web app mode back to free.

You can find more details about how to get an IP for Web app and in this document: Map an existing custom DNS name to Azure Web Apps

So,if you worry about this, I recommend you to configure CNAMEs .

Upvotes: 1

Related Questions