I have a domain hosted on AWS (www.example.com) and it works fine. I have now a temporary need to route traffic from this domain to a temporary Wix hosted domain (www.example.net). I've tried making a CNAME to simply route from www.example.com to www.example.net (see attached) but it doesn't seem to work. It just either loads the original webpage (when I exclude the "www"), or shows a generic wix error page "Looks Like This Domain Isn't Connected To A Website Yet!", even though the new website loads fine when I type in the new domain.
What I've tried (I am using nodeJS with express).
I went to my app.js in my node server and changed the code to this:
var app = express();
app.get('*', (req, res) => {
// REDIRECT goes here
res.redirect('https://www.example.net/')
})
module.exports = app;
when I run the server locally (localhost:5000) the redirect seems to be fine, but with I pull the code to the server and type the domain (www.example.com) it still points to the original website
