Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have two domains: and I want to implement the following scenario:

Whenever a user enters, the browser should display contents of but the URL should remain

How can I implement this?

share|improve this question

migrated from Jan 23 '12 at 5:08

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

You need to add more detail. What's the underlying platform? Which technology stack do the two site use? More detail == better answer. –  Abbas Dec 26 '11 at 16:32
Hi Abbas, is just a domain purchased from and web site is hosted in another domain that is The hosting provider is and written in Asp.Net. –  Varun Sharma Dec 27 '11 at 20:17 is just a domain and not a webhosting.. It is like I have registerd a domain but without any hosting plan. –  Varun Sharma Dec 28 '11 at 6:35

3 Answers 3

Since you are using GoDaddy for domain2 you can take advantage of their masking solution for domain redirects. This allows the visitor to domain2 to visit domain1 while still seeing domain2 in the address bar. The masking option is part of the redirect option within your GoDaddy domain control panel. More info can be found in the help files here:

share|improve this answer

You should use a CNAME DNS record. So when users are on they see content from without using an iframe which isn't that good IMO

share|improve this answer
Of course, for this to work, the webserver at must be configured so that it accepts requests for pages on and returns the same content as for domain1. But yes, as long as you take care of that, this is IMO the best solution. –  Ilmari Karonen Mar 17 '12 at 23:37
@IlmariKaronen As long as you registered and have control of it's DNS, same for domain2 there is no configuration on the server that need to be made to setup a CNAME other than name server and DNS control. –  Anagio Mar 18 '12 at 0:28
If your webhost is using name-based virtual hosting (which it most likely is, unless you run your own private server and have only one site running on it), it determines which content to send based on the original, unresolved hostname sent by the browser in the Host header. If the hostname it sees isn't anything it recognizes, it will show either an error message or some default page that is probably not what you want. –  Ilmari Karonen Mar 18 '12 at 0:59
Read their question and comments they dont have hosting for domain2, it's pretty simple. User's go to and see the content of the most common way to do this is a CNAME record, they work just as well on shared hosting accounts. –  Anagio Mar 18 '12 at 1:04
Anagio: Why don't you try it? Set up a hostname on your own domain with a CNAME pointing to, say,, and see if you can get the content from this site to show up on your hostname. (Spoiler: it won't work.) –  Ilmari Karonen Mar 18 '12 at 1:10

you can use iframe and put its src to your and it width and height to 100% with no border.

<IFRAME SRC="" TITLE="Domain 1">


share|improve this answer

Your Answer


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