Solution for Canonicalization Problems to WordPress Site
- Article
- Comment
Solution for Canonicalization Problems to WordPress Site. Canonicalization is one of the important factor for SEO. I already wrote an article to optimize the IP and URL Canonicalization. Here is the article. Which will help you to understand well. You can do this by overwriting the .htaccess file. Else you can use WordPress Rewrite functions to perform it dynamically.
If you want to perform it with the help of .htaccess. Use the above link and follow the steps. If you want to do this by writing programs. Just follow the steps.
add_rewrite_rule('^kvcodes\.com$','https://www.kvcodes.com/$1','top');
The above function will add the rewrite rule on the top of the .htaccess file to ensure the redirection. Likewise, you can do the IP Canonicalization.
add_rewrite_rule('^146\.255\.44\.1$','https://www.kvcodes.com/$1','top');
You can change the url any functional . either kvcodes.com or www.kvcodes.com.
I mean you can create non-www urls and www urls. Also the IP canonicalization, If you have any queries drop your comment below.