0

I am creating a single page of an existing website for a client but they have requested that I host it on my own account and they can "point to it" from their host. They want to keep their URL in the name. For example www.theirsite.com/new-page

What is the best way to accomplish this?

If they create a subdomain (subdomain.theirsite.com) and point the A-record to the page on my IP address (ip.ip.ip/page) is there a way to maintain their desired URL (www.theirsite.com/new-page)?

1

Not sure if I get what's your problem right... but if you want to map different virtual subdirectories of the website to different hosts, you can do it with a reverse proxy. Apache httpd has a module (mod_proxy_http) for this.

If there's already a proxy in front of the website the change should be really simple to make. If not it will have to be configured from scratch.

1

If they want www.theirsite.com to appear in the URL, in the browser address bar, then the server which answers connections for www.theirsite.com must serve something for /new-page, there is no way around that to just completely offload everything to somewhere else - not by subdomains or DNS A record trickery(*).

But there is a very easy way not mentioned so far - /new-page serves a placeholder page with an iframe element, and that tells the browser to load content from your server by some other name - a subdomain or any other name. This would show their name in the URL bar, and have the browser make another connection to load the content from your server. You could make a subdomain of their site, and have your server answer to that name, so it looks like a related server.

It would be obvious to anyone who looked at the source code that it was loading from somewhere else, but unless there is some active logon part to the site, security which needs everything on exactly the same name, or HTTPS certificates involved, it would work OK, and to any normal viewing or ordinary user it would show as their site in the URL bar.

The way to integrate it so it looks like part of their site, but is hosted by you, is with a reverse-proxy, as @sam_pan_mariusz suggests.

This is where their webserver answers the connection, their webserver loads the content from your server, and their webserver serves the content back to the browser. It would need configuration on their server to do it, and it would add more work on their server, but to the outside world /new-page is roughly indistinguishable from any other content on the site.

(*) There is no way to point an A record to a specific page, 'A records' are in DNS and are looked up very early, and URL paths happen in HTTP requests much later, after the connection is open; they are very different layers and they don't mix easily.

0

If I understand you correctly: they have a website http://www.theirsite.com/, maintain it somewhere, and want you to maintain the page http://www.theirsite.com/somepage somewhere else.

If I am correct, and you want to keep things simple, answer is NO. If they want you to host is separately, it will be on separate domain name (probably subdomain, but still other name, like http://sub.theirsite.com/somepage). If they want to keep their complete domain name, they will need to host it themselves.

There are solutions for such cases, but that are complex. They could host everything on their server, but reverse proxying that particular page address to other server, which is maintained by you. If they are able to do this setup, it will do the thing, but they need to perform configuration changes on their hosting server.

  • Thanks! So If they create a subdomain (subdomain.theirsite.com) and point the A-record to the page on my IP address (ip.ip.ip/page) there is NO EASY way to maintain their desired URL (www.theirsite.com/new-page)? Correct? – njpatten Dec 7 '15 at 19:52
  • The only way to do this will be reverse proxying of your page. It is possible, but not as easy as the breeze and definitely harder that setting DNS records of subdomains or simply letting your page to be on the original domain. I suggest you to do as they want and let them solve a problem. Should they solve it - good, otherwise they will cease disputes and go simplest possible way. – Nikita Kipriyanov Dec 7 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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