I have 2 sites, example.co.in and example.com, hosted on 2 different servers (I have all access details for both).
When someone accesses example.co.in/a/b.php?c=d, I want it to show the HTML of example.com/a/b.php?c=d
This site has to be search-engine-friendly, so I do not want to use an iframe, or even AJAX, since all the content has to be in the HTML - basically, example.co.in/a/b.php?c=d should output just the same HTML as example.com/a/b.php?c=d would.
I could use echo file_get_contents(example.com/a/b.php?c=d) in example.co.in, but that would mean a request goes from the example.co.in server to the example.com server, and then the output would come to the example.co.in server, which would then send it to the user. That could mean time delay, and also that I am using twice the bandwidth - since there is data transfer from both my servers.
Apache rewrite will change the URL, which I do not want to happen - I want people who browse example.co.in to stay on it.
I was wondering if any of the numerous experienced people on this forum would be able to suggest a solution. Thank you very much for your time!
If I understand correctly, you want to have site A on host A in country A use machine B to render it’s content, and you want this content to be unavailable to anyone but site A. And you also want to not use any bandwidth in transferring the content from B to A.
You could try the server forums, but I think what you are describing is impossible. You can either tell the browser where to go, or fetch and serve yourself.
example.com is a much bigger site than example.co.in (though I do not think that should matter, as long as URLs of example.co.in work)
example.co.in is on IP a.b.c.d, and example.com is on IP p.q.r.s. The sites should continue to resolve to those IPs. SEO is important here, and Google should see that example.co.in is an Indian site (which it can detect from the Indian TLD) hosted on an Indian IP (the IP of example.com is a US IP address).
Really? I guess I’m going off topic if I ask any links to confirm this… but it seems really stupid to me. I thought search engines where all about content. I certainly don’t care where a site is hosted.
It apparently matters, at least a little. I tried to ask this in SEO, what I understand is that Google will favor a .com hosted in Canada over Germany if the user is in Canada, and all other things are equal. I didn’t get any confirmation as to the tld, so I can only assume that tld is more important than location.
Thank you, Hash. The content that will appear on example.co.in will not appear on example.com - it will appear only on example.co.in. However, all my scripts and databases are on the example.com machine, and I want all processing done there.
If the content is the same google will know this. It doesn’t matter what IP/country/host. You can’t seriously think they’re stupid enough not to realize that they’ve just indexed the same content from two different domains?
My take (after investigating last time) is that .co.nz means NZ no matter where it is hosted. But .com/.org/etc are generic and get extra points depending on where they are hosted.