Hi,
Possible add 404.html for every subdomain? Beacause add 404.html file for every “branch” (subdomain) is not effective.
OR
Redirect every 404 error to 404.html or something else.
Sorry for my bad English. I am from Slovakia.
Hi,
Possible add 404.html for every subdomain? Beacause add 404.html file for every “branch” (subdomain) is not effective.
OR
Redirect every 404 error to 404.html or something else.
Sorry for my bad English. I am from Slovakia.
hi @Anonymus2020. are you talking about all of the subdomains on one apex domain or all of the subdomains on multiple apex domains?
for example :
html 404 saved at assets.example.com/404.html
add for all subdomains of domain
example
apps.example.com
about.example.com
I believe you could do a redirect:
using something like
*.example.com /404.html
specific 404 doc here:
i try
*.example.com example.com/404
to _redirects in “master” branch
dont work
The rule you’ll want will be:
/* /404.html 404
And you’ll want to make sure that /404.html
is changed to the path wherever your 404 is.
Here’s the docs again, just in case
Does this match on subdomains?
IE: any path .example.com without a route, will now result in example.com/404.html ?
I don’t actually see this in the docs that / would match on subdomains?
Oh rats, apologies. No, you’re right, you’ll need to explicitly define each subdomain.
If each subdomain is its own site or branch subdomain then yes, my example would work. How are your subdomains configured?
i have web epik.tk
what i there put to _redirects ?
just every subdomain / branch same 404 as epik.tk/404.html
Hey! If you’re looking to use branch subdomains, each branch will typically have its own _redirects.
Are you using Netlify DNS? If so, you will want to check out this article. If not, there’s some additional config required.
Do you have a link to the site(s) and can you elaborate more on your issue too?
for example
test.epik.tk/fuiefiorufieorfj = epik.tk/404
yes i have netlify dns/nameservers
Wildcard subdomains are a paid feature I believe that engineers can set you up with if you’re a paying customer. Not sure that it would work as you’ve quoted above, I just know that it is a manual thing that needs to be activated.