Custom domain's subpages not redirecting to GitLab subpages


I have created a custom domain ( that I am to point to my GitLab project ( So far I have:

  1. Registered a custom domain via CloudFlare.
  2. Deploy the pages by connecting the GitLab repository to Netlify
  3. Setup deployment to the custom domain via Netlify

Now, I manage to get the main page to point to, but I do not manage to get any subpages, like to point to As you can see I am getting 404:s when I try to access these subpages.

I hardly know any HTML or JavaScript or anything so please be gentle and very explicit in your replies. I would be very, very grateful for some help here.

hey there, is this helpful at all?

Yes, thank you! Sorry for posting similar issues several times.

1 Like


I am having a similar issue, but following the steps proposed above doesn’t do the trick. Initially, I deployed my website on Netlify with a default domain ( that pointed to my GitHub repo. I have recently registered my domain via Netlify, but from my GoogleAnalytics I still see people going on my (now, .app) page, instead of on the right website (
Probably, I am doing something wrong following the instructions above. I have created a new file in my public folder (which is my publish directory) and I’ve tried both with /* /index.html 200 and with /app/* /app/index.html 200! but none redirects to my current page. Do you have any suggestion?

Thank you,

Hi, @lucacarbonelc, it looks like you have found the solution already. I was going to suggest the following redirect in _redirects format: 301!

However, you already have that rule in netlify.toml:

  from = ""
  to = ""
  status = 301
  force = true

I would recommend a second rule be added to redirect other pages/assets to the custom domain as well:

  from = "*"
  to = ""
  status = 301
  force = true

With both redirect rules, nothing will be served from except 301 redirects to the custom domain. Only the custom domain will be used for the site with both rules in place.

If there are any questions about this, please let us know.