Hello to everyone. Maybe this is not a theme issue but I don’t know where else to ask. I will consider a lot if you guys help me.
So my website is http://www.storypickers.com
I just set as my preferred domain the version with www and then put a 301 redirect code on the .htacces so that everyone who visit the version without 301 will be redirect the my preferred domain, this is more for google. Because if you didn’t set a preferred domain, google thinks that your content is copied.
However the code I put in .htacces is this:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.storypickers\.com
RewriteRule (.*) http://www.storypickers.com/$1 [R=301,L]
But I think the redirect still doesn’t work. Because when I do a seo tool check here: http://nibbler.silktide.com/ it tells me that I don’t have a 301 redirect for my preffered domain.
I’m thinking that the code I putt on the htaccess is nor correct. Any suggestion what I should do?
All the best
Presuming you made the setting in your Google Search Console to tell Google that www is preferred version?
Also, from my prior answer to your question on this (heavy sigh) … did you add the explicit version of your prefereed URL to your wp-config.php file?
If you do, then WP will do the redirect automatically since that will be part of its internal rewriting engine and then you would not need the 301 redirect.
Also, do search/replace in your dbase for all images linked without the www to add the www, update any custom menus, etc.
Last reply on this topic from me. You seem to keep reposting things vs updating your original thread. So, “I’m out” on support for this topic. Good luck!
I need you for one last thing.
I finally done, the redirect is finally working.
In wp-config.php, I didn’t put my preferred version, Do i need to put it know that my redirect works? or isnt neccesary?