Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Domain Name Forum


You are currently viewing our Domain Name Forum as a guest. Please register to participate.
Login



Reply
Can I point two different domain names to the same website?
Old 02-12-2009, 07:51 PM Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
What I would like to do is register one ".com" domain

and another as a different national TLD such as ".kr"

On the the server there would be an English index.php page with a folder for all the English language pages

AND

an index_kr.php page with a folder for all the Korean pages.

Ideally I'd like some kind of browser language detection to
show whichever index page is appropriate when a visitor lands on the site.

How can I do that?
Are there any SEO or security issues?
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-12-2009, 08:11 PM Re: Can I point two different domain names to the same website?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
How can I do that?
IP detection and redirect, better done server side than client side. BUT if you use separate folders and a different index page you don't need redirects.

Quote:
Are there any SEO or security issues?
All major SE bots have US IPs so will never index the Korean language pages

Security issues are the same as with any site.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-12-2009, 08:54 PM Re: Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
So lets forget about IP detection for a minute.
(I'm not a big fan actually. I hate it when websites assume that because i happen to be in a particular country i want to see sites for that language).


Lets say I just want anyone entering www.mysite.com into the URL box to go to the english page and anyone entering www.mysite.kr into the URL box to go to the korean page.

Likewise the search bots.
I'd like each respective URL to appear in the SERPs

But without duplicating all my site assets, whats the most efficient way to set that up?

Last edited by TWD; 02-12-2009 at 08:56 PM..
TWD is online now
Reply With Quote
View Public Profile
 
Old 02-12-2009, 09:01 PM Re: Can I point two different domain names to the same website?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Depends on how your hosting is set up.

Simplest way is to have the .kr in one folder and the .com files in a different one then server the files from the appropriate folder depending on which hostname was requested.
If the file names are the same for the page to be served, it's a really simple task with any server side code.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-12-2009, 09:19 PM Re: Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Depends on how your hosting is set up.

Simplest way is to have the .kr in one folder and the .com files in a different one then server the files from the appropriate folder depending on which hostname was requested.
When you say "hostname" you mean URL, right?

Can you give me a clue about how the server side code would dish up the correct setof pages? I'm using PHP.
TWD is online now
Reply With Quote
View Public Profile
 
Old 02-12-2009, 09:48 PM Re: Can I point two different domain names to the same website?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The hostname for internet addresses is the bit from the sub to the tld. eg: blog.domain.tld

Shell pages in the root directory with this code;
PHP Code:
<?php
switch ($_SERVER["HOST_NAME"]) {
    case 
"www.domain.com":
        include 
"/path_to_com_page/" $_SERVER["PHP_SELF]" ;
        break;
    case 
"www.domain.kr":
        include 
"/path_to_kr_page/" $_SERVER["PHP_SELF]";
        break;
}
?>
And the files for each language in sub folders.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-12-2009, 11:19 PM Re: Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
Thanks Chris.

Search engines crawling the .com address would see the English content
and when crawling the .kr address would see the Korean content. Is that correct?

So would this could just go into a single index.php file in the root directory?
TWD is online now
Reply With Quote
View Public Profile
 
Old 02-13-2009, 06:13 AM Re: Can I point two different domain names to the same website?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
in the simplistic way I have set the code, you would have 3 files for every URI. One in the .com folder and one in the .kr folder. The third is in the root and has the code above in it only.

There are of course better ways of handling this using a CMS system but for simple sites consisting of a few pages it's a quick and easy solution.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-14-2009, 04:00 AM Re: Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
Quote:
Originally Posted by chrishirst View Post
in the simplistic way I have set the code, you would have 3 files for every URI. One in the .com folder and one in the .kr folder. The third is in the root and has the code above in it only.
This sounds like a really good solution to my problem!

So just to make it crystal clear, lets say i had a simple 3 page site.
A home page, a contact page, and a products page.

I have these two domain names, with both DNS pointing to the same location:
www.mysite.com
www.mysite.kr

The site architecture would look like this?:

/index.php (with Chris's code above ONLY)

/eng/index.php (with the english version home page)
/eng/contact.php (english version)
/eng/products.php (english version)

/kr/index.php (with the korean version home page)
/kr/contact.php (korean version)
/kr/products.php (korean version)


Is that correct? Only ONE file is needed in the root directory?
TWD is online now
Reply With Quote
View Public Profile
 
Old 02-14-2009, 09:43 PM Re: Can I point two different domain names to the same website?
HighLayer's Avatar
Novice Talker

Posts: 12
Trades: 0
Yes, that looks pretty good.

If you are using Cpanel then you can just redirect each domain to a specific folder from the control panel.
__________________

Please login or register to view this content. Registration is FREE
- Web Hosting, Reseller Hosting & Dedicated Servers

100% uptime SLA - 24x7x265 Support - RVSiteBuilder Pro - FFmpeg Modules - Remote Reboot
HighLayer is offline
Reply With Quote
View Public Profile
 
Old 02-15-2009, 07:41 AM Re: Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
Quote:
Originally Posted by HighLayer View Post
Yes, that looks pretty good.

If you are using Cpanel then you can just redirect each domain to a specific folder from the control panel.
Are you talking about Add-On domains?

Thats another option I guess.
But I tend to think Chris's method is better because for one
thing, some hosting companies place a limit on how many free Add-On
domains you are allowed to have.

With Chris's "index file include method" its expandable to unlimited number
of domains I should think.
TWD is online now
Reply With Quote
View Public Profile
 
Old 02-15-2009, 10:14 PM Re: Can I point two different domain names to the same website?
HighLayer's Avatar
Novice Talker

Posts: 12
Trades: 0
Yes, if it works for you then use that method. I was just mentioning another option just in case. We are glad to help and good luck.
__________________

Please login or register to view this content. Registration is FREE
- Web Hosting, Reseller Hosting & Dedicated Servers

100% uptime SLA - 24x7x265 Support - RVSiteBuilder Pro - FFmpeg Modules - Remote Reboot
HighLayer is offline
Reply With Quote
View Public Profile
 
Old 02-16-2009, 05:52 AM Re: Can I point two different domain names to the same website?
TWD
TWD's Avatar
King Spam Talker

Posts: 1,112
Trades: 0
Thank you. Really appreciate ALL advice on this forum.
TWD is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Can I point two different domain names to the same website?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.33353 seconds with 12 queries