Is there a way to set up a domain and use it as primary and whenever someone goes to the original subdomain that it forces the new domain name?
Domain Manager
0
You can accomplish this with a piece of JavaScript in the head section, for example:
<script>
const defaultDomain = 'sparkpromotion.forumspark.net';
const customDomain = 'google.com';
if (window.location.hostname === defaultDomain) {
window.location.href = 'https://' + customDomain + window.location.pathname + window.location.search;
}
</script>
0
Would be easier to have it as default especially if this platform allows custom domains.
Does that code do a wildcard redirect?
0
Yeah, it's annoying that happens. I'll look into this if I can fix that. I'll keep you updated.
You might also like...
Topic
Replies
Views
Last reply
upload smileys in the file manager, and something i swear I saw in documentation…and one more..
In Support, started by Deleted User, 3 months ago
15
806
Custom domain now redirects to not found page
In Support, started by Excalibur, 4 days ago
4
262
