So, quite a while back I moved on from my first domain (frankbyte.com) to something more tailored for the app (owlocr.com), but neglected to sunset the old page. There was still some traffic and old links pointing there and I didn't want those people to just land on some random site.
My first solution was to have both domains build from the same git repo. While technically this works fine, it does feel... weird. There's also the problem of duplicate content which may not jive well with all the rules of the SEO tango.
I've been using Next.js for a while and I really like it so I wanted to do this with that too.
Creating a site from scratch was really easy.
yarn create next-appto create the basic site.
yarn devin appropriate directory to run on your local machine.
- Check it out in the browser (localhost:3000), delete all unnecessary content and modify to your liking in the
- BONUS: Create a 404.js file in the pages directory with the same (or different) content as you put in
index.js. This will ensure that no matter which subpath your traffic ends up on, they'll see your move notification.
If you like, feel free to use my repo as a starting point, although, it does only include the change above plus removing some other unnecessary stuff (the sample API):
You can check out the resulting page at frankbyte.com