with a 301, I redirect friendsofcoffee.nl to misterbarish.nl.

I use the .htaccess file for the redirect with following code:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^friendsofcoffee.example$ [OR]
RewriteCond %{HTTP_HOST} ^www.friendsofcoffee.example$
RewriteRule ^(.*)$ “https:\/\/misterbarish.example\/$1” [R=301,L]

Also tried this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^friendsofcoffee.example [NC,OR]
RewriteCond %{HTTP_HOST} ^www.friendsofcoffee.example [NC]
RewriteRule ^(.*)$ http://misterbarish.example/$1 [L,R=301,NC]

Also tried this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.)friendsofcoffee.example [NC] OR RewriteCond %{HTTPS_HOST} ^(.)friendsofcoffee.example [NC]
RewriteRule ^(.*)$ https://misterbarish.example/$1 [R=301,L]

Also tried this

Redirect 301 / https://misterbarish.example/

But search console gives me the following error message. (Translated by Google translate.)

Detour was not found https://www.friendsofcoffee.example/

I tested the status code using https://httpstatus.io/

User agent: Googlebot —> gives only 200, but no 301
User agent: Your browser —> gives only 200 and 301, so it technically works

What is going wrong? I prepared this very thoroughly because I really don’t want to lose rankings.

Do you have an idea? Is it the coding in the .htaccess file?


  • How did you set up the DNS, virtual hosts, and directories for the two sites? Do the two sites point to the same place? Does DNS point to the same server? If so, do the two sites have separate directories, or do they share the same document root? – Stephen Ostermiller Dec 2 '19 at 11:55
  • The DNS points to: different server and the IP addresses in DNS are totally different. DNS setting for friendsofcoffee.nl with 301 in htaccess: A: | DNS setting for misterbarish.nl is A: . I try to understand the why of your question? Why this could influence? – Tim Dec 2 '19 at 14:08
  • I see the redirect. Did you fix it? I noticed your code used .example in the domain. The second snippet also had invalid quotes in it. – Tony McCreath Dec 2 '19 at 22:21
  • Hi Tony, the 301 redirects were always working. Only not validated by change address in Google search console. Yesterday I simplified the code RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)friendsofcoffee\.nl [NC] RewriteRule ^(.*)$ https://misterbarish.nl/$1 [R=301,L] – Tim Dec 3 '19 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.