Mobile app version of vmapp.org
Login or Join
Sims2060225

: How does a webmaster perform a proper redirect from one domain to another? There are a few questions that are inherently present inside the main question. Those questions are: What is the

@Sims2060225

Posted in: #Apache #Htaccess #Redirects #Seo #WebCrawlers

There are a few questions that are inherently present inside the main question. Those questions are:


What is the best way to perform this type of redirect? (Presumably a 301 Perma for SEO Best practices. You will retain 90%-99% of your link juice.)
At what level would you perform the redirect? Would you do it at the registrar level, in the cPanel/direct admin/etc, or would you perform this task in the .htaccess file? (Presumably the .htaccess file)
There are so many ways you can redirect from one domain to another how do we webmasters who can't read Apache directives know which is the best one to use? It can't be as cut and dry as "Just use any that works".


As there are multiple ways to accomplish this task, the task of redirecting one domain to another, the PRIMARY CONCERN of this question is what is the BEST WAY to accomplish this task, perform a redirect, and do it properly Below are a few of the examples I have seen (on this site and other sites):

1.

Redirect 301 / www.newdomain.com/



2.

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) www.newdomain.com/ [R=301,L]




3.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} olddomain.com$
RewriteRule ^(.*)$ newdomain.com/ [R=301,L]




4.

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ newdomain.com/ [L,R=301]

RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
RewriteRule ^(.*)$ newdomain.com/ [L,R=301]




5.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ www.your_domain.com/ [R=301]




Your assistance in this matter is priceless I have been trying to get a straight answer to this question for months. Even other people I see ask this question or questions similar receive the same answer even though our problems are sightly different or largely different. If you can, when you answer this, please explain to me why the redirect method you choose to answer with is the best one, why it's the best, and how it works. Please break down the Apache directive so that myself, and others who come after me understand not just how to copy and paste a redirect but the particulars as well.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Sims2060225

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme