Getting Access Denied Error

@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?

@gregraven no, that’s my “production” build that was built within Netlify.
i’m trying to access the deploy preview that Netlify says should be live at the url I posted above.
I generated the deploy preview by building locally and then using netlify deploy.

So, if I remove my _redirects file the the Deploy preview works as expected.
I then re-added my redirects file, and the deploy worked again.
This seems to have resolved the problem? No code changes were made.

@makon Excellent. That’s good to know. Glad you figured it out.

Hey there,

I’m seeing the same issue on one of my deploy previews. We run deploy previews on every PR in our repo, and usually they work fine. On this particular PR, I see the same error page listed above at the generated preview link deploy-preview-2443–

When I go to the Netlify app, and into the deploy details for this particular preveiw, and click the “Preview” button from the build page, I get sent to a different site, commit-hash– This link works just fine. I also opened another PR with the exact same commits to trigger another preview to make sure it wasn’t an issue with my code, and the preview on that PR works fine as well.

I tried removing the _redirects file and re-adding it, and that didn’t solve anything. Was there any further investigation on this issue and why it might happen? We’ve done thousands of deploys and seems like this just randomly appeared, and we’d like to be confident that our site won’t break when we deploy.

Hi, @attfarhan. To troubleshoot, we need to know the actual URL which isn’t working.

You can post that information publicly or you can private message (PM) that to one of our support staff. I’ve confirmed that PMs are enabled for your community login. Please keep in mind that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.