homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

example.com & example.org
how to handle

 11:27 pm on Aug 2, 2013 (gmt 0)

If I've posted this in the wrong forum, please move it! (I couldn't figure out which is the best one!)

I have a long established example.org website. Most content pages are example.org/directory1/file1.html

I recently acquired the example.com domain name, but I plan to retain example.org as the primary name.

So would it be better to (a) redirect page requests like example.com/directory1/file1.html to the same page on the example.org site.

Or should I just (b) direct all example.com requests to the root of example.org?

I'm leaning toward (b) because I doubt there are many existing links which confuse the .org and .com domains.

What do ya'll think? (and is there other options that I haven't thought of?)



 1:37 am on Aug 3, 2013 (gmt 0)


If you're not going to do a page-for-page redirect, then why redirect at all?


 2:11 am on Aug 3, 2013 (gmt 0)

Well, assuming I'm right about very few existing incorrect links, anyone that mistypes the URL and ends up at the example.com domain would get a very obvious reminder that the "real" (preferred) is the example.org domain.

I suppose I could route it to a temp landing page that gives them that message for a few seconds and then redirects to the equivalent example.org page.


 7:28 am on Aug 3, 2013 (gmt 0)

I would always go for a page-by-page redirect.

Assuming you use Apache, point the DNS for both hostnames at the same hosting space and add:

RewriteCond !^(www\.example\.org)?$
RewriteRule (.*) http://www.example.org/$1 [R=301,L]

to the root htaccess file after all other external redirects and before any internal rewrites.

Make sure that you also convert all Redirect and RedirectMatch rules to instead use RewriteRule syntax.


 9:17 am on Aug 3, 2013 (gmt 0)

RewriteCond !^(www\.example\.org)?$

If your StickyMail box weren't chronically full... ;)


 10:47 am on Aug 3, 2013 (gmt 0)


I was concentrating so hard on not missing out the exclamation mark (one of my most common typos) I completely omitted %{HTTP_HOST} from the example code - and yet I remember typing it at least once today, because I corrected HTPP to HTTP; it must have been in a different thread... going bonkers...

The corrected code is:

RewriteCond %{HTTP_HOST} !^(www\.example\.org)?$
RewriteRule (.*) http://www.example.org/$1 [R=301,L]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved