Getting Access Denied Error

I’m getting an error:

Access Denied

Description: You are not allowed to access the document you requested.

The custom domain works correctly.
Thanks for you help.

@thomascenni Do you have a redirect or something else set up? This doesn’t look like a Netlify error page.

It might help to know your custom domain name for comparison.

I do not have any redirect, I do not have any 404 template with this text, that’s why I thought that it was a error from Netlify.

hi there, this isn’t from us:

looks like some kind of create react app error page?

Thanks @perry, but I’m sure that this isn’t from me!!
Why the custom domain works ?

It’s the same code!
Don’t know where to investigate.

@thomascenni For what it’s worth, the code looks different to me:

<TITLE>Access Denied</TITLE>

<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Access Denied</H1>

<FONT FACE="Helvetica,Arial"><B>
Description: You are not allowed to access the document you requested.

Can you share your custom domain name with us?

@gregraven I think the custom domain is the link @thomascenni posted just above -

@thomascenni are you running any kind of _redirects or interjectory Functions? It’s true that and the more generic (not specific to your Master branch) are indeed returning 403’s from the server which is a behavior that would typically imply Netlify’s involvement, but the rendered error screen is not that of Netlify’s creation. At best guess I’m wondering if you’re running a Function that’s responding with a 403 from the Host: header not matching or perhaps a proxy (a _redirects method using a 200 status) to another service that’s noting a bad Host: header as well.

When using CLI to send an HTTP GET request to but manually specifying the Host: header to returns your page content correctly… so… that’s odd. Will wait to hear back on my above questions.


@jonsully Thanks for pointing that out. I always miss those links somehow.

@thomascenni This could be an inactive DNS zone:

|================== check for inactive DNS zone =================
| --------------- last line should show --------------- 3600 IN A 86400	IN NS 86400	IN NS
;; Received 161 bytes from in 62 ms

Are you certain you have the correct entries in both the Domains section and in the Site domains settings sections in your Netlify dashboard?

This is the same code I have.

I take that back. I was under the presumption that we’d see something more like the error page rendered here if this was on Netlify’s end:

This is Netlify sending back a 404 because it can’t find the associated site handle. (Hopefully nobody changes their site name to make this actually resolve in the meantime :wink: )

That’s what I’m used to seeing, anyway. Upon further digging for Thomas’ site,, here’s a whole bunch of other random subdomains off that render the same 403 and forbidden message:

Which tells me a few things. First, I didn’t know this was a thing :slight_smile: Second, @thomascenni I think your site is fine - you’re just possibly using the wrong subdomain. Could you double check your site’s domain settings and make sure you’re using the exact, correct Netlify-assigned subdomain please?

And third, @perry my spidey senses are telling me that this is the difference between Netlify’s subdomain resolver matching a pattern for Netlify’s assigned subdomains vs. something not matching that pattern and just not being available.

E.g. booring-rafalind-443b38 looks like a pattern than Netlify would assign, 1234bab does not. I’m wondering if there’s a code disconnect between when something fails the pattern matcher and isn’t found (the latter; returns a 404) and when something doesn’t fail the pattern matcher but still isn’t found (prior, a 403). Curious but something I’d recommend digging into :eyes:


Please see my Domain Settings:

Thanks !

@thomascenni I think your site is fine - you’re just possibly using the wrong subdomain

Wow. Well. There’s really no reason that shouldn’t resolve then.

I just went ahead and created a micro-site just to see if there was perhaps an issue with the random-ID generator and resolver not matching between assign-time and render-time, but it appears to work fine there…

Really not sure why this would be happening. :confused:


These are my DNS zone records:

I followed the documentation to set them up.
Should I change the Site Name inside the Netlify panel ?
This could be a test.

@thomascenni Not yet. Could you post a screen shot of your Domains page for this site, assuming there is one?

Sorry, may be I don’t understand, but I’ve already posted here my domain settings:

@thomascenni I was just wondering if perhaps you had added this as a domain name to the Netlify system via the Domains section, but somehow not linked it in. There shouldn’t be an entry in the Domains section because you are hosting the DNS elsewhere, but I’m trying to wrap my head around what’s going on here.

Have you tried setting your www custom subdomain as the primary instead of your apex domain, as recommended in the docs?

No, I didn’t try to setup the www subdomain as primary.
If I remember well, when I read the documentation some times ago, the suggestion was to setup the apex domain as primary, but I can be wrong.

When using external DNS, you should set the www subdomain as your primary.

I’m getting the same error on a deploy preview after using netlify deploy cli command.
I do not have a custom domain set up.

@makon Is this what you’re trying to reach?