We have example.org (our main site) registered and hosted on an american server. We bought example.gr domain name in Greece, a local registrar. We made .gr point at .org DNS all right. A visitor types URL .gr and sees .org in his browser all right, but URL immediately changed to .org. Is there a way to keep URL .gr and still see .org? If a .org visitor then clicks on a link to example.org/abcd.php, could a .gr visitor clicking on the same link see the address bar show example.gr/abcd.php?

Our American registrar told us to contact Greek registrar and ask for mapping. The Greek registrar basically set an iframe displaying example.org and called it example.gr. But that was wrong because obviously, each time a visitor would click on something, the address bar would always display one thing only, the same URL all the time, example.gr. So we cancelled that cheap mapping trick down, and I don't know what to do.

4 Answers 4


You could make an <iframe>,

<style type=text/css>
    body{margin: 0;overflow:hidden;}
<iframe src="http://example.org/" style="border: 0; width: 100%; height: 100%" frameBorder="0">
    Browser not compatible.

So you'd call this index.html and put it on the example.gr server.


I wouldn't class a iframe solution the best solution, while this doesn't answer your question directly it does give you an additional and more robust never-mind a more browser friendly site.

The method that I believe is best suited for you is to use rel="canonical" on the .gr domain referring to .org as the master (no redirects). If they visit .gr they remain on .gr and vice versa on the .org. The .org will be the master for rankings purposes in Google as same as the iframe method.

So to make this possible you do the following:

  1. Clone the file contents of the site to another hosting folder so effective you have 2 hosting accounts but these are mirrored.
  2. Setup the .gr site to use the database of the .org site so both sites are exactly the same. (You may need to adjust the base_url) or use a multiple site plugin (if you don't have a SQL then even easier).
  3. You will want to use rel="canonical" on both the master .org and .gr as the slave.
  4. Optional step (you could even robots the .gr site from indexing)

Examples of rel="canonical" in action:

In the head of your master site (.org domain) you would use the following:

<link rel="canonical" href="http://www.example.org/page1"/>

In the head of your slave site (.gr domain) you would use the following:

<link rel="canonical" href="http://www.example.org/page1"/>

This basically tells Google that the master is the org, you could even go one step further and robots.txt the .gr site completely but with this method you will not get a duplicate content slap on the .gr with or without robots.

Using two domains one site WordPress

Step 1: Go to your General Settings and completely remove the "Blog address (URL)" and save.

Step 2: Add something like the below code to header.php:

$ThisDomain = $_SERVER['SERVER_NAME'];

if($ThisDomain=='example.org' || $ThisDomain=='www.example.org')
{ echo '.org stuff'; }
elseif($ThisDomain=='example.gr' || $ThisDomain=='www.example.gr')
{ echo '.gr stuff'; }

Step 3: Ensure HTTP_HOST is not set in the SQL.

  • How about if there are session cookies?
    – ionFish
    Commented Mar 9, 2013 at 14:59
  • You should be able to store cookies based on the base_url rather than statically on the main site. So visiting .gr will give a .gr based cookie and visiting the .org will give a cookie for that domain. They shouldn't need to bounce to from one another, certainly the way the OP has posted this is not his/her intention. Commented Mar 9, 2013 at 15:01
  • One of the reasons I mentioned a multiple site plugin as take WordPress or Joomla for example they statically set the main site, you can get plugins to overcome this so it doesn't redirect and cookies are set correctly. Commented Mar 9, 2013 at 15:02
  • The most ideal situation would just to redirect .gr to .org but ya ;) Commented Mar 9, 2013 at 15:05
  • I meant, how would WordPress be able to use both cookie domaines? Doesn't it only work with one domain? (I know MyBB has this limitation). ikailo.com/218/cross-domain-cookie-sharing-wordpress seems like too much work. Or this: maisonbisson.com/post/14028/…
    – ionFish
    Commented Mar 9, 2013 at 15:12

It sounds as though you're looking for a parked domain. This is easy to set up if your web host is running cPanel.


If you're not using a shared hosting account and have access to the Apache configuration just create another virtual host with a different ServerName pointing to the same document root.

Other webservers will have a similar set up, for example just make another server {} block for nginx.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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