In my previous role I spent a lot of time doing site transition, simply put the basic principles of properly doing a site transition is to make sure that there are no broken pages / URLs to be found on a website (regardless of them being indexed or not). Without going into detail about all the different types of site transitions there are, I am going to show you how I used a Google Sheet and a custom Google App Script function to speed up the process and increase the quality of a website transition.
Last week I release an introduction to Google App Scripts guide and would suggest checking it out before continuing on with this guide!
Note: I have come across a few websites that have their web servers setup in such a way that instead of returning a 404 status code, the url redirects (302) to a page with the characters “404” on it while returning a HTTP status code of 200, this is considered a “soft 404” in Googles eyes. Hopefully the website you are working on does not do this, but if it does, feel free to contact me and see how I got around that issue.
Before we start I will mention that in order to make the most out of this, you are going to need to compile the largest list of URLs for a website that you can. This means going beyond just the sitemap, the reason being is that most sitemaps are dynamically created upon request. In other words if a page or url gets delete from a website it too will be deleted from the sitemap, meaning if the sitemap is your only source of truth your not going to find any broken links. Hint: Google is your friend.
Lets get into it!
Depending on the source of your list, you may have duplicate URLs. Two ways you can clean the list is by using the quick function “Data> Remove Duplicates” Or using the built in function “unique()”.
That’s it! Hopefully you have now seen another way you can use Google App Scripts to automate and speed up your day!
Feel free to contact me on LinkedIn if you have any comments or suggestions!