How do I redirect www to non-www with 301 permanent move on domains?
.htaccess file editing on How to solve 301 redirect problems on domain hosting


301 redirect solved

Use canonical URLs

Set a preferred URL for your content

avoid duplicate content problems with 301 redirect in the .htaccess file on the Apache server

How to hack the Apache server

htaccess 301 problem

.htaccess file programming   htaccess solutionhow to get 301 redirects to work .htaccess problem

301 Redirect

advanced apache server programming

How to get 301 redirect to work in the .htaccess file on hosting service.

Play it Now!

301 Redirect Problem With

redirect permanently with 301 code
Have you tried to redirect to but it failed? Tech Article Links

How do I create a working 301 redirect for domains?

301 htaccess redirect doesn't work for domains

SEO advice: url canonicalization

Kan du programmera Apache? Då kan du programmera radiostyrda leksaker!


www vs non-www, how to make a proper 301 redirect for your website
Canonicalization is the process of picking the best url when there are several choices

301 Redirect problem with domains

301 .htaccess redirect doesn't work for domains!

But here is the hacker solution you need to get it solved

* How do I create a working 301 redirect for domains?

* Have you tried to redirect to but it failed?

301 permanent redirects solution for any domains by re-programming the .htaccess Apache server file correctly. Struggling with 301 htaccess redirect problems on ONE.COM domains? You are not alone..

301 redirect: .htaccess redirect problems on are frustrating, but there is a working solution. I have found a way to do it. There are many examples out there if you google htaccess redirect or 301 redirect or www to non-www and phrases like that. But most of them will fail. They won't redirect your domain and you are stuck with canonical errors that will lower your search engine ranking due to duplicate content on your site. and are two different domains! This will lead search engines to think you have 2 versions of every page on your domain and that is BAD! Why? Because search engines, especially google, will give you a penalty if you have duplicate content and now you have the whole site duplicated!

Since hosting service has over 1 million customers I'll bet I'm not the only one struggling with this.

So how do I solve the duplicate content problem? Or the Canonical error problem?

You need to redirect your site "" to "", that way all visitors coming to for example:

will get teleported in real Star Trek style to:

Click on the links and see for yourself!

I got it working with a domain and so could you.

Solution to the 301 redirect problem on domains

Did you try this example of a 301 redirect but it didn't work for you?

RewriteCond %{HTTP_HOST}   !^www\.mr-eurodisco\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)$1 [L,R]

or maybe you tried this 301 redirect and failed miserably:

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^www\\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

But you didn't give up your .htaccess hacking and coded this instead:

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

But all of them fail.. frustrating isn't it?

I won't keep you hanging on the line any more. This is what you need to add in your .htaccess file in your root directory:


Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^mr-eurodisco\.com
RewriteRule (.*)$1 [R=301,L]

Note: Don't miss the dot "." with a space in between on line three. Very important! Your site could become inaccessible if you miss the dot. I'm not kidding.

Cut 'n paste EXACTLY AS IT IS WRITTEN. If you fuck it up then delete the .htaccess file to open up your domain to the public again. Naturally you need to change "mr-eurodisco" to "yourdomain" but I think you understand that if you have read this far :)

[R=301] instructs search engines that this move is permanent (good for SEO) and the visitor also see the changed URL in the browser bar.

[L] Give the Apache server the order to halt the processing of the current pass through mod_rewrite and instead initiate the next pass with the new {REQUEST_URI}.

You can combine them just like I did above like this [R=301,L]

That is the ultimate solution to the htaccess redirect problem for your domain

Keywords: htaccess, redirect, 301, 301 redirect problem,, URL Forwarding and
URL redirects


301 redirect problem with domains solved redirect problem how to get 301 redirects working in the .htaccess file on domains
Copyright ® Fredrik 'Mr Eurodisco' Åkerström      Sitemap
        Home               Htaccess problem
301 not working on domain







Mr Eurodisco