Comment on 301 Redirect Htaccess by SEO Dave.
Add a .htaccess file to each domain you don’t want to use to the domain you do want to use.
If you planned to use the .com you’d setup a .htaccess file with this in the other two:
RewriteEngine On RewriteCond %{HTTP_HOST} !^www.stallion-theme.org$ RewriteRule (.*) http://www.stallion-theme.co.uk/$1 [R=301,L] RewriteCond %{HTTP_HOST} !^stallion-theme.org$ RewriteRule (.*) http://www.stallion-theme.co.uk/$1 [R=301,L]
The one above redirects the .org to .co.uk. so that would go in the root of the .org site.
For a .net domain replace org with net.
The above is also set to redirect the non-www to the www version of the domain.
David Law
More Comments by SEO Dave
www/non-www Canonical SEO
301 Redirect Everything Under a Directory via .htaccess
Hmm, after rereading what I suggested the .htaccess option isn’t suitable for all directories like /wp-content/plugins/ it would 301 redirect everything under the folder to home rather than just stop users seeing the contents!
I’ve deleted that part of my earlier …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
How to Hide Website Directories
Hiding a directory is a server side setting.
Assuming you run on an Apache server it’s having something like:
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Into your httpd.conf file for each domain on a server, this would make no directories that lack an index.html, index.php …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
301 Redirect index.html
It’s the first 301 redirect example in the main 301 redirect article.
If it’s just the one webpage to redirect it’s
RewriteEngine On
Redirect 301 /index.html http://domain.com/
Add it to the root .htaccess file.
David …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
301 Redirects Causing a Loop
This code:
DirectoryIndex index.html index.asp index.htm index.php
RewriteEngine On
Redirect 301 /index.html http://www.domain.com/
Will cause a loop.
You are saying via DirectoryIndex that index.html is the home page if it exists, then redirecting index.html to root which will look for index.html which will redirect to …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
Canonical www/non-www Problems are SiteWide
It’s all pages of a domain, the rules above are designed for site wide 301 redirects.
David Law …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
www to non-www 301 Sitewide Redirects
Looks like you have a 301 redirect setup so the www version of your site is redirected to the non www version.
This sort of Google search:
site:http://domain.com
Shows your site is indexed under the non www version.
Loading the www version of your …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
301 Redirect index.html to Root
A 301 redirect from index.html to root won’t open your directory up for all to see as long as the DirectoryIndex is set to an index.*** file that is within that directory.
Easiest way to know is test it, does loading …
Continue Reading .htaccess File Redirect 301
www/non-www Canonical SEO
How 301 Redirects Work
When a 301 redirect loads in a browser window you ‘see’ it redirect.
If you use the non www redirecting to the www and you loaded http://example.com/ it would immediately reload (redirect) to http://www.example.com/
If that doesn’t occur you’ve probably made a …
Continue Reading .htaccess File Redirect 301