Make mydomain.com redirect to www.mydomain.com

Hi,

Currently I am using WeWeb on a custom domain and it works fine, except that I have to always put “www.” before the domain:
https://www.mydomain.com works but https://mydomain.com doesn’t.

How do I configure my DNS settings in Google Domains in order to make the non “www” url redirect to the “www.” ?
It is easily doable on Webflow but I can’t find a way to do it on WeWeb.

Thanks in advance :slight_smile:
Lancelot

1 Like

Hi @lancelot,

WeWeb does not offert this option.
If you when your naked domain to redirect to the “www” domain, you can try what is described here :
https://support.google.com/sites/thread/141806277/how-to-redirect-naked-domain-to-www-subdomain?hl=en

I did not test this because I don’t have a Google Domain account.
Each domain name provider will have a different way to handle this use case.

1 Like

I just migrated my Bubble site over to WeWeb and am now realizing what a huge headache this is causing. All of the links I have created around the web have pointed to the non-www version of my domain using a secure protocol (https). Since WeWeb doesn’t allow me to secure the non-www version of my domain, if anybody clicks on an existing link of that version, it will go to a dead page and there is nothing I can do about it. So it’s forcing me to try and manually update as many links as I can, which is a lot of links!

Really really hope WeWeb can offer a solution to this sooner than later!

2 Likes

What are you using for your DNS registry? There’s an option here to stand up a server for the sole purpose of 301-redirecting all traffic from the base URL to the www one. Google domains for example seems to support that out of the box, but others might vary.

1 Like

Oh that’s interesting! I’m using Namecheap for all of this. Currently have the www and the SSL CNAME records (as WeWeb instructs) setup and then, based on what I’ve read, I’ve got a URL Redirect Record setup as follows:

It seemed with Bubble the redirect was handled not at the DNS level, but on the server level so I was able to simply point records for the @ and www and both were taken care of SSL wise.

So right now http://techaudit.tv redirects just fine to https://techaudit.tv but if I try the secure non-www (https://techaudit.tv) you can see that it goes nowhere.

1 Like

I wonder if you can work it with an ANAME record. Looks like namecheap might support it? https://www.namecheap.com/support/knowledgebase/article.aspx/10128/2237/how-to-create-an-alias-record/#:~:text=An%20ALIAS%20record%20(also%20known,other%20records%20on%20that%20name.

Hi Brandon!

Any chance you found a solution for this?

Hi @petyaaa6 :wave:

Yes, he did and shared the solution here: TUTORIAL – How to link a custom domain to a WeWeb app - #26 by brandon

I’ll be updating the user docs and recording a video tutorial this week so it’s easier for everyone to find the information in the future!

2 Likes

I think I’m going mad!

Somethings changed. I hadn’t got round to setting up the Cloudflare redirect yet as discussed here, but was about to.

However, the redirect is now happening… by itself. Has either WeWeb or GoDaddy made some sort of change to facilitate this does anyone know?

I did recently enable languages and now my domain is now 301 redirected to the langauge version /en/. Perhaps that’s it and changed something, but it’s really odd it’s now forwarding from what.gift to https://www.what.gift/en/ as it wasn’t working like this a few weeks ago and I’ve not changed any other settings.

I’m only asking, as I now don’t know whether I actually need to setup Cloudflare. I don’t like not knowing how something works.

I haven’t done the hack to work around this issue but wanted to note it hasn’t automatically been fixed for me - still won’t find the site without the www.