MyBB Community Forums

Full Version: Best way of redirecting a domain to another
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've got a spare domain that i want to point to another domain which is my main site, what would be the best way of doing this?

I've got both domains Name Servers set up correctly to my hosting, and i was wondering the easiest way to do this.

Thanks.
From cPanel, go to www redirection part.

Or if you don't use cPanel, it could be done via htaccess as well.
Thanks, i did see that in my cPanel, but wanted to know any other ways.

Just out of interest, with this redirect domain set up, what happens to it? And i'm talking in terms of SEO/ranking/hits, is it affected at all?
In that case, the domain which is being redirected, in google rankings or pages, where it shows your domain URL, it will show the contents of the domain on which it is re-directed.
Whats the best way to redirect domain.com to newdomain.com and still lead to the same threads on the new domain from google search ?
Go into cPanel and click "Domain Redirects"
But if i come from google search i still see the old domain how do i make it to use the new domain and also display the same thread is it possible to match olddomain.com/thread-84.html to newdomain.com/thread-84.html from google search ?
^That would need a simple htaccess rewrite rule.
So i did like this

RewriteEngine on
RewriteCond %{HTTP_HOST} ^newdomain.org$ [NC] 

        RewriteCond %{SERVER_PORT} ^80$
        RewriteRule ^(.*)$ http://www.newdomain.org/$1 [R=301,L]
        RewriteCond %{HTTP_HOST} ^olddomain\.org$ [OR]
        RewriteCond %{HTTP_HOST} ^www\.olddomain\.org$

RewriteRule ^(.*)$ "http\:\/\/www\.newdomain\.org\/$1" [R=301,L]

Can someone confirm this is the correct way?