Sitewide 301 Code is Not Redirecting All URLs

25 Views Asked by At

Good day everyone, I did a 301 redirect from old-domain to new-domain but I noticed from Google search console that some urls where still pointing to the old-domain. I had thought placing that 301 code will redirect all the URLs to the new domain. Please is there something I am not getting right.

I have place the follwoing code in the htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} ^old-domain\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.old-domain\.com [NC]
RewriteRule ^(.*)$ http://new-domain.com/$1 [L,R=301]
0

There are 0 best solutions below