Welcome to WebmasterWorld Guest from 54.146.194.42

Forum Moderators: open

Message Too Old, No Replies

.ORG site also registered as .com: Should I do a JS redirect?

or can I get away by pointing dns to .org?

     
10:25 pm on Jul 16, 2002 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:13970
votes: 122


Granted, I will not submit the .com to search engines.

I would rather not pay to host the .com just to have an automatic JS redirect. Instead I would like to have the parked domain dns resolve to the .org dns. Will this be cool with the SE's?

This is for a non-profit web site.

11:55 pm on July 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Martinibuster,

I have registered a .com domain in addition to my site's "real" .org domain. Both are pointed
to the same server. When I get a request for "domain.com", or "www.domain.com", or even
"domain.org", I use mod_rewrite in .htaccess to do a permanent external redirect to www.domain.org.

Thus I have only one domain "showing" to the world. If someone forgets that we're a .org it works.
If someone just types "domain" into their address bar, and their browser adds the "www." and a
".com" it works. And I cover the case of rewriting "domain.org" to "www.domain.org" only to avoid
confusing some SE robots, which seem to want to look at domains both with and without the "www".

Since this is a permanent external redirect, the user's address bar gets updated, so he can't save
an "incorrect" bookmark. Spiders also follow the redirect, so they don't index the "incorrect"
domain - or any of the other domain variants. And of course it works with or without JavaScript
enabled.

I haven't had any problems attributable to doing it this way. I'd recommend it over a JS-only
solution if you have .htaccess and mod_rewrite priveleges on Apache server.

Jim

12:26 am on July 17, 2002 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:13970
votes: 122


Hmm... I DO have access to .htaccess on another site. The .com site is not yet hosted.

1) Is this how I would do it?

Redirect /index.html [target.org...]

(This is the example that my host posts in the .htaccess section.)

2) I assume from your answer that this is the best way to do it, however, that means I end up paying hosting charges on the .com merely to redirect it to the .org. Or am I not grasping something?

1:34 am on July 17, 2002 (gmt 0)

Moderator

WebmasterWorld Administrator buckworks is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2001
posts:5609
votes: 19


I'm not enough of a techie to know how it's done, or what it's called, but my host set things up so the .net and .org versions of my main domain resolve to the .com version (they all have the same DNS info). Aliasing, maybe? There is no hosting for the other names, there was just a very reasonable one-time set-up charge.

If that's what you want, it CAN be done.

1:58 am on July 17, 2002 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:13970
votes: 122


buckworks,

That sounds like pointing the dns to resolve at the same ones as the .com. Good to hear it's not causing you any problems. This seems to be the cheap and easy way to go.

I just didn't want my client to end up getting busted, banned and burned somewhere down the line.

2:05 am on July 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0


This will forward all requests:
Redirect 301 / [domain.org...]
2:08 am on July 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0


buckworks:
Umm, you better find out how this is being done. If it is a redirect you will be all right, but if it is not and you are showing the same content on three domains you are going to run into problems. Hang on, I got a solution for you if the latter is the case.

[edited by: littleman at 2:15 am (utc) on July 17, 2002]

2:13 am on July 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0


If you *are* having all the domains pointing to the same content this will redirect all requests accept the dot org ones. This should help in your PR too.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mydotorg.org
RewriteRule ^.*$ [mydotorg.org%{REQUEST_URI}...] [L]

2:20 am on July 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


martinibuster,

My situation is the same as buckworks - this is just something the hosting service did, for a
low (or no) one-time fee. I just asked them to "point" the ".com" domain to my existing ".org"
server - as buckworks stated, its the same IP address.

In .htaccess in my root directory, I use:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.my-domain.org$
RewriteRule ^(.*)$ [my-domain.org...] [L,R=permanent]

[Read as: If the requested host is not exactly www.my-domain.org, then redirect any <file_requested>
to [my-domain.org...] using a permanent (code 301) external (visible to the
user's browser) redirect. Also, since this RewriteRule is tagged "L" for "Last", stop rewriting
URLS right here.]

You may also need to use the RewriteBase directive if things don't work as expected - I'll refer
you to the Apache Server documentation of mod_rewrite on that issue, 'cause I haven't ever had to
use it.

As to whether this is the "best" way to do it, I think so. But that just means it's the best way
for *me* with my server environment setup. It does have the advantage of not requiring JavaScript
redirects, which spiders likely won't follow, and of course, some users disable JavaScript.
However, it does require .htaccess and mod_rewrite priveleges, which not all hosting services grant
to webmasters.

Jim

2:28 am on July 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


martinibuster,

And yes, as littleman says, this is only OK if you never try to use the alternate domain names
to fool search engines into indexing the same site at two addresses. If you use the multiple
domains as I did, only as a courtesy to my visitors in case they type the wrong address, and if
you do not attempt to "publish" the alternate addresses by having other sites link to them, then
everything is cool with the search engines, as far as I can tell.

If robots try to use an alternate address, the 301 permanent rewrite tells them that the site
has been moved permanently to the standard address, and that seems to be good enough for them.
If they find a link to your alternate address the 301 tells them to forget it and use the standard
one instead.

Jim

3:10 am on July 17, 2002 (gmt 0)

Moderator from US 

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 13, 2002
posts:13970
votes: 122


Great answers, people!

I'm much obliged.

3:18 am on July 17, 2002 (gmt 0)

Moderator

WebmasterWorld Administrator buckworks is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2001
posts:5609
votes: 19


If someone types in "mysite.net" they will not be shown pages with mysite.net URLs, they will be shown pages with mysite.com URLs.

It used to be that the URL would stay as "mysite.net/something" but after I asked, my host changed it so that any/all of the variant domains would end up at "mysite.com".

Always without the www. bit, too!

3:44 am on July 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


buckworks,

Yes, in my example above, just put whatever site name you want to be your "standard" in
both lines. The external redirect will update the browser's address bar, and the browser
will request the page using the "correct" URL. You can use either of the top-level domains
(in my case .org or .com) and have a subdomain (www or another) or none at all. As long
as both lines match, it works fine.

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members