Say, you have initially deploy the website on GitHub Pages, but you want to move to Netlify or Heroku.
Perhaps, totally destroy the old website, and create
404.html for GitHub Pages (or redirect rules with 301 for other websites), filled with one-liner...
<meta http-equiv="refresh" content="0; URL='http://new-website.com'" />
This is my said website, BTW -- https://patarapolw.github.io/blog