Today we will be discussing a scenario where when we moved our old WordPress website to a new domain and want to redirect all the old posts/pages/categories etc. links to this new domain/subdomain without affecting our SEO. This also involves redirecting all social media posts links we shared years back on Facebook, Twitter, LinkedIn etc.
So here is what I’ve been trying to do:
🔸 Made a copy of my old website & move it to the new domain/subdomain.
🔸 Redirecting all old articles links to my new domain/subdomain articles links.
🔸 Do not want to write 100’s of redirections for each of my article, so i will use regular expression with wildcard to redirect everything.
🔸 I want all my posts that were previously been shared on various social media even 3-4 years back, to still redirect all clicks to my new domain/subdomain URL’s. so the users won’t reach 404 page or any old pages.
🔸 Do not want to loose or hamper my good SEO traffic been done on my old website. As keeping both websites running parallel will be penalized by Google for duplicate content. I will follow SEO practices on new domain/subdomain & discard old website.
🔸 I do not want to go technical by editing .htacess file on server as other security plugin’s have access to my .htaccess, and do not want to hamper my WordPress website in the process.
🔸 Make it easy for me to easily enable/disable redirection if it involves any changes to my old website in the future.
Some points to keep check:
- First and foremost, do not delete your old website.
- Just discourage search engines to index your old site.
- For the new domain, Add Google tracking code, Add search console property, & Submit a new siteindex.xml.
- Keep the old tracking code & search console property to analyze any direct or referral links still coming to your website, also to keep your past
- analytics data for analysis & comparison reports for future audits.
- Remove any unnecessary plugins, cache, cdn links from old WP website.
- Remove unnecessary users data.
- You can write more redirects & expressions for old links as your own custom rules.