You will need to add 301 redirection if your change url of your WordPress site. 301 redirection will redirect all the posts from old url to new url. 301 redirection also tells search engine about change of address.
Let’s say the old url was olddomain.com and new url is newdomain.com
Now you want to add 301 redirection in oldoamin.com
Follow below steps to add 301 redirection.
1) create a text file and name it as htaccess.txt
2) Add following codes in htaccess.txt
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Note: change newdomain.com to your site new address
3) Upload htaccess.txt file in wordpress installed directory i.e in public_html of olddomain.com and rename it as .htaccess
Done !!!
Few Conditions to clear doubts:
1) if old wordpress url is olddomain.com/blog than, upload .htacess file to public_html/blog
2) If new WordPress url is newdomain.com/blog, change newdomain.com to newdomain.com/blog in htaccess.txt
WordPress Plugins for 301 redirection
There are few WordPress plugins also for 301 redirection, but its better to just add a .htaccess file.
You can leave a response below, or trackback from your own site.





0 ResponsesLeave a comment ?