In order to use the same domain name for your website hosted externally and things like Node-Red running on a server at home you need to redirect some of the internet traffic.
In order to redirect traffic on port 80 (HTTP) to my blog hosted at WordPress.com I used the trick described in my previous tutorial on setting up a Pi with Node-Red.
Since that I have switched to HTTPS (port 443) so we can not use Node-Red anymore to do the forwarding of HTTP traffic. Instead we will run a webserver on the Pi redirecting all visitors to an external website using HTTP. (The site itself will redirect to a HTTPS connection).
Lets get started.
sudo apt install apache2 sudo service apache2 start
Edit the index.html located in /var/www/html
That’s it! off-course you need to forward port 80 of your home router to your Pi so HTTP traffic will go from your router > pi > external site.