Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    43
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Force Browser to request for another domain using DNS?

    If browser requests for www.foo.com then I want to send back a DNS response (answer) to the browser which would make browser to ask request DNS entry for www.bar.com. This time if I see request for www.bar.com, I would let it follow through and let the DNS system reply with 'A' record for www.bar.com.


    In short I want to force browser to go to another domain using DNS. I referred CNAME record but it does not seem possible to achieve this using CNAME records. Can you please suggest something?


    Can it be done using DNS or would I have to look for another technique.

  • #2
    Regular Coder patryk's Avatar
    Join Date
    Oct 2012
    Location
    /dev/couch
    Posts
    398
    Thanks
    2
    Thanked 64 Times in 64 Posts
    you can do that using DNS if your DNS server will allow you to remove all A records and leave only CNAME.
    otherwise you can use redirection in .htaccess file (and that's prolly better idea)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •