• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

DNS domain records domain A redirect to domain B

Hey guys,

Quick DNS question

I have DomainA
I have DomainB

DomainB is resolving to the webpage I want.

DomainA is not - I would like DomainA to resolve to DomainB.

What record do I need ?
1 Solution
Make an A record for DomainA that points to the DomainB IP address.
Create a new A record for domain B with the same IP address as domain A
If you're working in IIS, you'll also need to make sure the host header for your website is either blank, or contains a host header for both domains.

Ask your ISP / admin to delete the DNS 'A'  record from Domain A and replace it with a 'CANME'pointing to Domain B's IP.

See: http://en.wikipedia.org/wiki/CNAME_record

Alternitively you could add a ReWrite rule in Domain 'A's apache virtual host definition, to re-direct all traffic to domain 'B'.

RewriteEngine On
RewriteRule  .*  http://www.domainB.com/  [R=301,L]
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now