the latter is set up as a custom domain and i have made it the default domain, but when i use the first url, it doesnt redirect me to the second url - the url in the browser remains the same.
the first url is already in the public domain as the client decided to have a custom url some time after publishing and marketing on the webflow.io domain…
so we want to forward any visits to the webflow.io domain to the new domain
I think this would work; duplicate the project, add site hosting to the webflow.io project and site hosting to the copy. On the copy spin up your custom domain. On the webflow.ioproject you would now be able to add redirects since they are unlocked with hosting. Then go tell Google that you are migrating domains. Once is sorted out and you don’t need redirects you could kill the .io project.
So just to confirm: there’s currently no way of redirecting a site published to a webflow.io subdomain without duplicating the site project and paying hosting for the original project and the duplicate? Seems like this should be something that Webflow could easily offer its users directly from the configuration, no? Sorry if I’m mistaken, I’m just a domains noob
Paste this code into the “Head code” field, on Custom Code tab on the site settings and make sure to publish on both domains the staged one and the custom domain.
<script>
if (location.hostname === 'subdomain.yoursite.com') {
location.replace('https://www.yoursite.com');
}
</script>