When migrating a website’s domain to a new domain, it’s important to check that the URLs in the old domain’s sitemap are redirecting 1:1 to the corresponding pages on the new domain. This helps ensure that search engines continue to crawl and index the site’s pages, even after the domain has changed and visitors can reach the right page on the new domain.
To make this process easier, I’ve created a script that can automatically check the redirects of URLs in a sitemap file or URL based on old and new domains. The script takes two parameters: the file path or URL of the old sitemap and the new domain.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Leave a Reply