Getting Access Denied Error

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

<HTML>
<HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>

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

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

Can you share your custom domain name with us?

@gregraven I think the custom domain is the link @thomascenni posted just above - https://integratedtradecollaboration.com/

@thomascenni are you running any kind of _redirects or interjectory Functions? It’s true that https://master--adoring-rosalind-443b38.netlify.app/ and the more generic (not specific to your Master branch) https://adoring-rosalind-443b38.netlify.app/ 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 https://adoring-rosalind-443b38.netlify.app/ but manually specifying the Host: header to integratedtradecollaboration.com returns your page content correctly… so… that’s odd. Will wait to hear back on my above questions.


Jon

@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 nsone.net ---------------

integratedtradecollaboration.com. 3600 IN A	104.198.14.52
integratedtradecollaboration.com. 86400	IN NS	ns6074.hostgator.com.
integratedtradecollaboration.com. 86400	IN NS	ns6073.hostgator.com.
;; Received 161 bytes from 50.87.144.56#53(ns6073.hostgator.com) 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:

https://1234bab.netlify.app

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, https://adoring-rosalind-443b38.netlify.app/, here’s a whole bunch of other random subdomains off netlify.app that render the same 403 and forbidden message:

https://adoring-rosalind-443b38.netlify.app/
https://adoring-rosalind-443b31.netlify.app/
https://adorang-rosblind-443b28.netlify.app/
https://booring-rafalind-443b38.netlify.app/

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 netlify.app 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 netlify.app 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:


Jon

Please see my Domain Settings:


Thanks !

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

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

adoring-rosalind-443b38.netlify.app

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… https://nervous-lamarr-d87632.netlify.app

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


Jon

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.
Thomas

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.
https://5fcf060e0d8a854434546f51--newroloakday.netlify.app/

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

https://newroloakday.netlify.app

@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–company.netlify.app.

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–company.netlify.app. 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.