Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to redirect a domain to a host on my local network.

For example

www.microsoft.com locally redirects to: host.ad.mydomain.local

What type of DNS record do I need?

share|improve this question

migrated from stackoverflow.com Aug 13 '10 at 18:28

This question came from our site for professional and enthusiast programmers.

A CNAME. But ask on serverfault.com, please. –  zneak Jul 28 '10 at 5:07

2 Answers 2

You need a CNAME record.

But I agree; we should have some easier functionality for moving between the StackExchange sites.

share|improve this answer

CNAME won't work. You can't even create a CNAME www.microsoft.com pointing to host.yourdomain.local because you are not hosting the domain "microsoft.com".

You can create a subzone called "microsoft.com", then a CNAME called "www" pointing to your own host.yourdomain.local. But then your internal users who use your DNS for name resolution won't be able to resolve other hosts under "microsoft.com" such as "msdn.microsoft.com" as your subzone doesn't have that record. Or you can create a wildcard record "*" in your subzone "microsoft.com", pointing to yourhost.yourdomain.local, then everything under microsoft.com will be brought to yourhost. This is sort of a DNS hijack, albeit internally only.

With that said, strictly speaking of the example you gave, it's a very interesting setup. Why would you want to re-direct microsoft.com traffic to your own host?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.