Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a domain from which a particular page will display the contents from the domain which does not belong to us. Now rather than display in the address bar in the browser, we would like to continue using We would like to achieve it without using iframes or screen scraping. Is there a way to achieve what we are after using DNS forwarding or aliasing? If so how? We have a choice of using Microsoft's DNS server or BIND.

share|improve this question

Set up a CNAME record to point to

share|improve this answer
How would that work? So if a user accesses the page residing on another domain i.e. they click on a link that reads, how will the CNAME continue to show the domain bearing in mind that the domain displays content specific to it? – PeanutsMonkey Jul 10 '12 at 20:10
I'm not sure I understand your question/scenario. A CNAME record will take and mask it as so if a user browses to it will actually run a lookup for but the URL will still be (depending on the browser). – Brent Pabst Jul 10 '12 at 20:13
So let's say I am logged into I click on a link that references What is the CNAME record set up as at this stage? Now if I click on the link, it pulls content from Assuming I interact with elements within that have absolute references e.g., will the address bar still display – PeanutsMonkey Jul 10 '12 at 20:17
If you click on a link for you will get redirected to there is no way to change DNS settings to handle that. You could theoretically setup a forwarder to it, but that will only work within your network. – Brent Pabst Jul 10 '12 at 20:21
So there is no other way to cloak the URL or domain? – PeanutsMonkey Jul 10 '12 at 21:16

Have you looked at the proxy capabilities of your web server? You may be able to proxy, and optionally cache the page.

DNS would only work if you can dedicate a domain to this page. As you don't control the domain a CNAME record would be the preferred choice. The site you are hiding may not be configured in a way that will support you using your own domain to access the page.

If you use DNS you are likely to run into problems. Any links on the page which specify the remote site will transfer your user to their site. Likewise any relative links on the page are likely to break, and won't lead back to your site. This can be mitigated if the site is hosting the page for you and are willing to set up a virtual server, and set the base for the page to your site.

EDIT: If your are running apache2 the following configuration would serve /page from the server page /page. The response for requests for this URL will be served by fetching the page from

<IfModule mod_proxy.c>
    ProxyPass /page
    <Proxy *>
       Order allow,deny
       Allow from all

Proxy configuration is well documented in the Apache HTTP Server documentation. Caching is also documented there. Other servers have similar capabilities.

share|improve this answer
Could you elaborate on the proxying the pages? – PeanutsMonkey Jul 11 '12 at 0:47
I would also add that nginx is designed to help with this and is lightweight. And no, I don't have any other information I can provide. – Brent Pabst Jul 11 '12 at 13:52

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.