URL redirects (WordPress, 2023)
When you migrate a website from one platform to another, it's crucial that the URLs on the old site, keep working on the new site. It's an urgent matter, once a site has been migrated.
Ensuring that your URLs are appropriately redirected is crucial to maintaining search engine rankings and providing a good user experience:
User Experience (UX)
If users click on a search result or a saved link from the old website and land on a "Page Not Found" (404 error), this disrupts their experience. It's likely they may leave your site out of frustration, leading to a potential loss in sales or conversions.
Search Engine Rankings
Search engines, like Google, value the user experience. When users frequently encounter 404 errors, search engines take note. Repeated 404 errors can harm your site's credibility and potentially decrease its search rankings. Additionally, if the search engine crawls the old URLs and can't find content, those URLs might be de-indexed, leading to a loss in search visibility.
Site Authority & Link Equity
Backlinks from other websites contribute to your site's authority and search rankings. If these links point to URLs that no longer exist and aren't redirected, you lose the "link equity" they provide. By setting up 301 redirects, the link equity is transferred to the new URL, preserving your site's authority.
Analytics and Tracking
It's crucial to maintain accurate data regarding website traffic, user behavior, and conversions. Broken links and 404 errors can skew these analytics, making it challenging to understand user behavior post-migration.
Branding and Perception
Consistency and reliability are key components of branding. Regularly leading users to non-existent pages may tarnish your brand's perception, making it appear less reliable or professional.
From Drupal to WordPress
Here's how you can address this issue for your webshop that's been migrated from Drupal to WordPress/WooCommerce:
Retrieve all old URLs
Start by generating a list of all URLs from your old Drupal site. You can use tools like Screaming Frog or SEMrush to crawl your site and get a list of all indexed URLs, but probably easier: All URLs are already available in the Drupal database, in table
url_alias. One way to export these:
mysql -e "use example_com; select * from url_alias" > url_alias.txt
Map the Old URLs to New URLs
Create a spreadsheet and map each old URL to its corresponding new URL on the WordPress site. This may be time-consuming, but it's an essential step to ensure that all pages are redirected correctly.
Set Up 301 Redirects
Once you have a mapping of old URLs to new URLs, you need to set up 301 redirects. This tells search engines that the page has moved permanently to a new location.
- For WordPress, there are several plugins that can help with this, such as "Redirection" or "Simple 301 Redirects". Install one of these plugins and then add each old URL and its corresponding new URL
- Alternatively, if you're comfortable editing your .htaccess file (typically used with Apache servers), you can add the redirects manually. Here's a simple format for a 301 redirect in .htaccess:
Redirect 301 /old-url-path https://example.com/new-url-path
Update Internal Links
If your site contains internal links that still point to the old Drupal URLs, update them to point to the new WordPress URLs. This will ensure a smooth user experience and will reduce the number of unnecessary redirects. Plugins like "Better Search Replace" can be used to bulk update links in your WordPress database.
Update & submit Sitemap
- Generate a new XML sitemap for your WordPress site. There are many plugins like "Yoast SEO" or "Google XML Sitemaps" that can help with this.
- Submit the new sitemap to Google Search Console. This will help Google crawl and index the new URLs faster.
Monitor 404 Errors
Even after setting up redirects, it's a good idea to monitor 404 errors on your site. This will help you identify any URLs you may have missed. The "Redirection" plugin for WordPress has built-in 404 error monitoring, or you can check Google Search Console for 404 errors.
Once you've set up your redirects, test a variety of old URLs to ensure they're redirecting correctly to the new ones.
Use Google Search Console to keep an eye on the performance of your website. Watch for any sudden drops in traffic or search rankings, which might indicate a problem with the redirects or other migration issues.
By following these steps, you'll ensure that the migration from Drupal to WordPress/WooCommerce goes as smoothly as possible with minimal disruption to your users and search engine rankings.