Mobile app version of vmapp.org
Login or Join
Ann8826881

: Website forwarding, keeping original URL 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

@Ann8826881

Posted in: #DomainForwarding #Url

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.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Ann8826881

4 Comments

Sorted by latest first Latest Oldest Best

 

@Pierce454

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.

10% popularity Vote Up Vote Down


 

@Sarah324

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

10% popularity Vote Up Vote Down


 

@Turnbaugh106

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:


Clone the file contents of the site to another hosting folder so effective you have 2 hosting accounts but these are mirrored.
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).
You will want to use rel="canonical" on both the master .org and .gr as the slave.
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.

10% popularity Vote Up Vote Down


 

@Phylliss660

You could make an <iframe>,

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


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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme