CNAME Dig Results in Unexpected 403 Error

Where I’m doing manual analysis I came across some wired cname configuration?

I have did > dig cname sub[.]target[.]com and get
sub[.]target[.]com cname:www[.]target[.]com

so if I GET sub[.]target[.]com I shoud access the cname resource but it return 403, any explanation?


Welcome to webs3c, @Nasreldeen!

Based on the information you provided, it appears that the CNAME record for points to This means that when you try to access, the DNS resolver will follow the CNAME record and resolve it to However, the HTTP response you received was a 403 error, indicating that the server is denying access to the resource.

There could be several reasons why you received a 403 error when trying to access Here are some possible explanations:

It’s possible that the server is configured to redirect requests from to, but the server is also configured to only allow access to certain resources from specific domains.

For example, the server may be configured to allow access to the resource from but not from In this case, when you try to access and get redirected to, the server will deny access to the resource because the request came from instead of

Another possibility is that the server is using a reverse proxy or load balancer that is intercepting the request and forwarding it to a different backend server. The backend server may be configured to only allow access from certain domains, which could result in a 403 error when you try to access the resource.

Ultimately, the exact reason for the 403 error will depend on the specific server configuration and the resource you’re trying to access.

I hope this answer your question.