I have my blog hosted at https://example.github.io
and it's been around for a while - and search engines etc. have indexed the pages.
I want to keep hosting the site on github pages (for now) but I want the move the site behind a custom domain.
I know you can setup a CNAME for custom domains on github pages - however it looks like once you do that, github will stop serving the contents from https://example.github.io
and just issue a 404 instead, with no opportunity to issue a redirect, so any existing links to the blog will be broken.
Is there any clean way of resolving this?