Ошибка 403 запрос не может быть удовлетворен


  • 17/01/202317/01/2023
  • 🕑 1 minute read
  • 494 Views

Исправьте ошибку 403. Запрос не может быть удовлетворен

Если AWS CloudFront выдает сообщение об ошибке 403 Error — запрос не может быть удовлетворен. Запрос заблокирован, тогда не волнуйтесь. Это можно исправить в кратчайшие сроки.

Здесь, в этом блоге, мы обсудим способ исправления этой ошибки сразу после того, как поговорим о том, что вызвало эту проблему в первую очередь. Давайте начнем!

Что вызывает ошибку 403, запрос не может быть удовлетворен, запрос заблокирован?

Причин возникновения проблемы может быть несколько. Здесь мы упомянули популярные из них:

  • Разрешение заблокировано. Если у вас нет необходимых разрешений для доступа к содержимому на сервере, вы можете получить эту ошибку в CloudFront.
  • Неправильно настроен сертификат SSL/TLS. Если в вашей раздаче CloudFront есть сертификат SSL/TLS, но он настроен неправильно, вы можете столкнуться с этой проблемой.
  • Ошибки конфигурации. Если CloudFront настроен на блокировку запросов с IP-адреса, вы можете получить ошибку 403.
  • Имя домена не связано — если запрошенное альтернативное имя домена не связано с раздачей CloudFront, вы можете получить эту ошибку.
  • Действие и правило не согласованы — если для действия по умолчанию установлено значение «Разрешить», но сделанный запрос соответствует правилу, для которого установлено значение «Блокировать». Если для действия установлено значение «Блокировать», но для правила установлено значение «Разрешить».

Как я могу исправить запрос об ошибках 403, который не может быть удовлетворен?

1. Измените правила AWS WAF, если для действия по умолчанию установлено значение «Разрешить».

  1. Войдите в Консоль управления AWS. Перейдите в консоль CloudFront.
    Ошибка Cloudfront -403 запрос не может быть удовлетворен.  запрос заблокирован
  2. Выберите идентификатор распространения, который вы хотите изменить или обновить.
  3. Перейдите на вкладку Общие.
  4. В разделе «Настройки» найдите AWS WAF и выберите список управления веб-доступом, относящийся к дистрибутиву.
    В дистрибутивах ошибка -403 запрос не может быть удовлетворен.  запрос заблокирован
  5. На странице AWS WAF & Shield выберите Web ACL на левой панели. Теперь для региона AWS выберите Global (CloudFront) на странице Web ACL.
  6. Перейдите к веб-спискам контроля доступа, которые необходимо просмотреть, на правой панели.
  7. Перейдите на вкладку «Правила» и в разделе «Действие веб-списка управления доступом по умолчанию» для запросов, которые не соответствуют ни одному из заголовков правил, убедитесь, что для параметра «Действие» установлено значение «Разрешить».
    Разрешить ошибку -403 запрос не может быть удовлетворен.  запрос заблокирован
  8. Теперь проверьте, что запрос, который возвращается с ошибкой блокировки запроса, соответствует правилу, в котором действие установлено на блокировку.
  9. Чтобы это исправить, необходимо проверить, не соответствует ли сделанный запрос условиям для правил AWS WAF, для которых для параметра «Действие» установлено значение « Блокировать». Нажмите на запрос, который был заблокирован, и в разделе Если запрос соответствует заявлению, проверьте его.
  10. Если допустимые запросы соответствуют предварительным требованиям для правила, которое блокирует запросы, измените правило, чтобы разрешить запросы. Для этого нажмите кнопку «Изменить».
    Блокировать
  11. На следующей странице прокрутите, чтобы найти Действие. Поставьте галочку рядом с Разрешить и нажмите Сохранить.

2. Измените правила AWS WAF, если для действия по умолчанию установлено значение «Блокировать».

  1. Выполните указанные выше действия (1–6), чтобы перейти на вкладку «Правила» в консоли AWS WAF.
  2. В разделе «Действие веб-списка управления доступом по умолчанию» для запросов, которые не соответствуют ни одному из правил, если для параметра «Действие» установлено значение «Блокировать», проверьте запрос, чтобы убедиться, что он соответствует условиям для всех правил AWS WAF с параметром «Действие», для которого установлено значение «Разрешить».
    Ошибка запроса -403 запрос не может быть удовлетворен.  запрос заблокирован
  3. Вы можете создать правило, если допустимый запрос не связан с какими-либо текущими правилами, для которых действие установлено на Разрешить. Для этого нажмите «Добавить правила», затем в раскрывающемся списке выберите «Добавить мои собственные правила и группы правил».
  4. На следующей странице перейдите в раздел Заявление. В поле «Проверить» выберите «Заголовок».
  5. Заполните данные для имени поля заголовка, типа соответствия и строки для сопоставления.
    добавить правило
  6. Выберите действие, чтобы разрешить. Нажмите Добавить правило, чтобы подтвердить изменения.

Таким образом, вы можете исправить ошибку 403: запрос не может быть удовлетворен в CloudFront. Выполните все шаги и сообщите нам, сработало ли это для вас, в разделе комментариев ниже.

Related post



В статье мы расскажем, что такое ошибка 403 (403 forbidden) и как ее исправить.

  • Ошибка 403: что она значит
  • Хостинг заблокирован
  • Некорректное название главной страницы
  • Файлы загружены вне корневой директории
  • Некорректные настройки в файле .htaccess
  • Некорректная работа плагинов
  • Как устранить ошибку 403 forbidden, если описанные способы не помогли
  • Что делать, если ошибка 403 forbidden запрещает доступ к стороннему ресурсу

Ошибка 403: что она значит

Ошибки вида 4хх относятся к категории ошибок клиента (браузера) — когда сервер отправил ответ на запрос, но браузер не может его обработать.

Код 403 (forbidden) значит, что доступ к этому ресурсу запрещен. Текст ошибки может отличаться, например:

  • error 403,
  • 403 запрещено,
  • HTTP 403,
  • Forbidden 403,
  • Access denied (перевод на русский: доступ запрещен),
  • Error: access denied и др.

Ниже мы опишем наиболее распространенные причины возникновения этой ошибки.

Хостинг заблокирован

Хостинг может быть заблокирован по следующим причинам:

  • Нехватка средств на балансе услуги. Пополните баланс хостинга, чтобы сайт продолжал работать.
  • Нарушение правил договора. В этом случае перед блокировкой отправляется уведомление на контактный email услуги: если вы получили это письмо, необходимо устранить нарушение в течение 24 часов.

Некорректное название главной страницы

Главная страница (или индексный файл) — это страница, которая открывается первой при переходе по домену. По умолчанию индексный файл в панели управления SpaceWeb называется index.html или index.php. Ошибка 403 (forbidden) означает, что файл отсутствует или его название отличается.

Чтобы исправить название файла:

  1. Перейдите в панель управления.
  2. Разверните блок Хостинг и выберите Сайты:

  1. Затем справа от имени пользователя кликните Открыть папку:

  1. Перейдите в корневую директорию сайта. Нажмите на иконку индексного файла и выберите Переименовать:

  1. Укажите название файла.

Если файл стартовой страницы отсутствует, выполните шаги 1, 2 и 3. Затем перейдите в корневую папку сайта и кликните Загрузить файлы:

Файлы загружены вне корневой директории

Ошибка 403 на сайте может возникать, если файлы не загружены в корневую директорию: например, файлы находятся в подпапке или выше на один уровень.
Чтобы это проверить:

  1. Перейдите в панель управления.
  2. Разверните блок Хостинг и выберите Сайты:

  1. Затем справа от имени пользователя кликните Открыть папку:

  1. Перейдите в корневую директорию сайта и проверьте наличие файлов:

Некорректные настройки в файле .htaccess

Иногда причина ошибки с кодом 403 — некорректные правила в файле .htaccess. Чтобы убедиться в том, что проблема в директивах .htaccess, измените название файла. После этого проверьте, осталась ли ошибка на сайте.

Для решения проблемы обратитесь к разработчику сайта. Зачастую она связана с правилами «RewriteRule» или путаницей с действиями «deny» и «allow».

 
Некорректная работа плагинов

Эта проблема может возникнуть, если ваш сайт создан на CMS WordPress. Чтобы исправить ошибку 403, необходимо перейти в админку сайта и обновить все плагины.
Если разработчики перестали поддерживать один из них, рекомендуем установить актуальный плагин с аналогичным функционалом.

Как устранить ошибку 403 forbidden, если описанные способы не помогли

Если вышеперечисленные способы не помогли и сайт по-прежнему недоступен — обратитесь в службу поддержки. Наши технические специалисты готовы помочь в любое время.

Что делать, если ошибка 403 forbidden запрещает доступ к стороннему ресурсу

Как исправить ошибку 403 (доступ запрещен), если вы перешли на сторонний ресурс:
Проверьте корректность URL. Иногда ошибка может возникнуть, когда вы обращаетесь к подразделу: например, при вводе в адресной строке test.ru/contacts возникает ошибка. Но если указать test.ru/contacts/ (со знаком / в конце), страница открывается корректно.

  • Проверьте, не закрыт ли доступ намеренно. Например, руководство предприятия может закрыть доступ с рабочих компьютеров ко всем ресурсам, кроме корпоративных.
  • Обновите страницу или зайдите позже. Высока вероятность, что владелец сайта знает о проблеме и занимается ее решением.
  • Возможно, сайт закрыт в определенном регионе. При подключении к интернету вашему устройству присваивается IP-адрес. IP содержит информацию о регионе, и на ее основе администратор может ограничить доступ к определенной странице или сайту целиком. Для решения проблемы можно использовать VPN или прокси-сервер.
  • Очистите кеш и cookies браузера. Это может быть полезно, если ранее не было проблем с доступом к сайтам.
  • Обратитесь к интернет-провайдеру. Если перечисленные способы не помогли исправить ошибку, обратитесь в поддержку поставщика интернет-услуг: возможно, провайдер попал в черный список — из-за этого могут быть проблемы с доступом к сайтам.
     

From Wikipedia, the free encyclopedia

HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden. The server understood the request, but will not fulfill it.

Specifications[edit]

HTTP 403 provides a distinct error case from HTTP 401; while HTTP 401 is returned when the client has not authenticated, and implies that a successful response may be returned following valid authentication, HTTP 403 is returned when the client is not permitted access to the resource despite providing authentication such as insufficient permissions of the authenticated account.[a]

Error 403: «The server understood the request, but is refusing to authorize it.» (RFC 7231)[1]

Error 401: «The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials.» (RFC 2616)[2]

The Apache web server returns 403 Forbidden in response to requests for URL[3] paths that corresponded to file system directories when directory listings have been disabled in the server and there is no Directory Index directive to specify an existing file to be returned to the browser. Some administrators configure the Mod proxy extension to Apache to block such requests and this will also return 403 Forbidden. Microsoft IIS responds in the same way when directory listings are denied in that server. In WebDAV, the 403 Forbidden response will be returned by the server if the client issued a PROPFIND request but did not also issue the required Depth header or issued a Depth header of infinity.[3]

Substatus error codes for IIS[edit]

  1. Затем справа от имени пользователя кликните Открыть папку:

  1. Перейдите в корневую директорию сайта. Нажмите на иконку индексного файла и выберите Переименовать:

  1. Укажите название файла.

Если файл стартовой страницы отсутствует, выполните шаги 1, 2 и 3. Затем перейдите в корневую папку сайта и кликните Загрузить файлы:

Файлы загружены вне корневой директории

Ошибка 403 на сайте может возникать, если файлы не загружены в корневую директорию: например, файлы находятся в подпапке или выше на один уровень.
Чтобы это проверить:

  1. Перейдите в панель управления.
  2. Разверните блок Хостинг и выберите Сайты:

  1. Затем справа от имени пользователя кликните Открыть папку:

  1. Перейдите в корневую директорию сайта и проверьте наличие файлов:

Некорректные настройки в файле .htaccess

Иногда причина ошибки с кодом 403 — некорректные правила в файле .htaccess. Чтобы убедиться в том, что проблема в директивах .htaccess, измените название файла. После этого проверьте, осталась ли ошибка на сайте.

Для решения проблемы обратитесь к разработчику сайта. Зачастую она связана с правилами «RewriteRule» или путаницей с действиями «deny» и «allow».

 
Некорректная работа плагинов

Эта проблема может возникнуть, если ваш сайт создан на CMS WordPress. Чтобы исправить ошибку 403, необходимо перейти в админку сайта и обновить все плагины.
Если разработчики перестали поддерживать один из них, рекомендуем установить актуальный плагин с аналогичным функционалом.

Как устранить ошибку 403 forbidden, если описанные способы не помогли

Если вышеперечисленные способы не помогли и сайт по-прежнему недоступен — обратитесь в службу поддержки. Наши технические специалисты готовы помочь в любое время.

Что делать, если ошибка 403 forbidden запрещает доступ к стороннему ресурсу

Как исправить ошибку 403 (доступ запрещен), если вы перешли на сторонний ресурс:
Проверьте корректность URL. Иногда ошибка может возникнуть, когда вы обращаетесь к подразделу: например, при вводе в адресной строке test.ru/contacts возникает ошибка. Но если указать test.ru/contacts/ (со знаком / в конце), страница открывается корректно.

  • Проверьте, не закрыт ли доступ намеренно. Например, руководство предприятия может закрыть доступ с рабочих компьютеров ко всем ресурсам, кроме корпоративных.
  • Обновите страницу или зайдите позже. Высока вероятность, что владелец сайта знает о проблеме и занимается ее решением.
  • Возможно, сайт закрыт в определенном регионе. При подключении к интернету вашему устройству присваивается IP-адрес. IP содержит информацию о регионе, и на ее основе администратор может ограничить доступ к определенной странице или сайту целиком. Для решения проблемы можно использовать VPN или прокси-сервер.
  • Очистите кеш и cookies браузера. Это может быть полезно, если ранее не было проблем с доступом к сайтам.
  • Обратитесь к интернет-провайдеру. Если перечисленные способы не помогли исправить ошибку, обратитесь в поддержку поставщика интернет-услуг: возможно, провайдер попал в черный список — из-за этого могут быть проблемы с доступом к сайтам.
     

From Wikipedia, the free encyclopedia

HTTP 403 is an HTTP status code meaning access to the requested resource is forbidden. The server understood the request, but will not fulfill it.

Specifications[edit]

HTTP 403 provides a distinct error case from HTTP 401; while HTTP 401 is returned when the client has not authenticated, and implies that a successful response may be returned following valid authentication, HTTP 403 is returned when the client is not permitted access to the resource despite providing authentication such as insufficient permissions of the authenticated account.[a]

Error 403: «The server understood the request, but is refusing to authorize it.» (RFC 7231)[1]

Error 401: «The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials.» (RFC 2616)[2]

The Apache web server returns 403 Forbidden in response to requests for URL[3] paths that corresponded to file system directories when directory listings have been disabled in the server and there is no Directory Index directive to specify an existing file to be returned to the browser. Some administrators configure the Mod proxy extension to Apache to block such requests and this will also return 403 Forbidden. Microsoft IIS responds in the same way when directory listings are denied in that server. In WebDAV, the 403 Forbidden response will be returned by the server if the client issued a PROPFIND request but did not also issue the required Depth header or issued a Depth header of infinity.[3]

Substatus error codes for IIS[edit]

The following nonstandard codes are returned by Microsoft’s Internet Information Services, and are not officially recognized by IANA.

  • 403.1 – Execute access forbidden
  • 403.2 – Read access forbidden
  • 403.3 – Write access forbidden
  • 403.4 – SSL required
  • 403.5 – SSL 128 required
  • 403.6 – IP address rejected
  • 403.7 – Client certificate required
  • 403.8 – Site access denied
  • 403.9 – Too many users
  • 403.10 – Invalid configuration
  • 403.11 – Password change
  • 403.12 – Mapper denied access
  • 403.13 – Client certificate revoked
  • 403.14 – Directory listing denied
  • 403.15 – Client Access Licenses exceeded
  • 403.16 – Client certificate is untrusted or invalid
  • 403.17 – Client certificate has expired or is not yet valid
  • 403.18 – Cannot execute request from that application pool
  • 403.19 – Cannot execute CGIs for the client in this application pool
  • 403.20 – Passport logon failed
  • 403.21 – Source access denied
  • 403.22 – Infinite depth is denied
  • 403.502 – Too many requests from the same client IP; Dynamic IP Restriction limit reached
  • 403.503 – Rejected due to IP address restriction

See also[edit]

  • List of HTTP status codes
  • URL redirection

Notes[edit]

  1. ^ See #403 substatus error codes for IIS for possible reasons of why a webserver may refuse to fulfill a request.

References[edit]

  1. ^
    Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. IETF. sec. 6.5.3. doi:10.17487/RFC7231. RFC 7231.
  2. ^ Nielsen, Henrik; Mogul, Jeffrey; Masinter, Larry M.; Fielding, Roy T.; Gettys, Jim; Leach, Paul J.; Berners-Lee, Tim (June 1999). «RFC 2616 — Hypertext Transfer Protocol — HTTP/1.1». Tools.ietf.org. doi:10.17487/RFC2616. Retrieved 2018-04-09.
  3. ^ a b «HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)». IETF. June 2007. Archived from the original on March 3, 2016. Retrieved January 12, 2016.

External links[edit]

  • Apache Module mod_proxy – Forward
  • Working with SELinux Contexts Labeling files
  • Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

403 Forbidden Error: What It Is and How to Fix It

Jun 22, 2022 7:41:27 AM |
403 Forbidden Error: What It Is and How to Fix It

A detailed explanation of what a 403 Forbidden Error response is, including troubleshooting tips to help you resolve this error.

The 403 Forbidden Error is an HTTP response status code that indicates an identified client does not have proper authorization to access the requested content. As with most HTTP response codes, a 403 Forbidden Error can be challenging to diagnose and resolve properly.

With a pool of over 50 potential status codes representing the complex relationship between the client, a web application, a web server, and often multiple third-party web services, determining the cause of a particular status code can be a challenge under the best of circumstances.

This article will examine the 403 Forbidden Error in more detail. We’ll look at what causes this message, along with a handful of tips for diagnosing and debugging your own application. We’ll even examine a number of the most popular content management systems (CMSs) for potential problem areas that could cause your own website to be generating a 403 Forbidden Error. Let’s dive in!

Server- or Client-Side?

All HTTP response status codes in the 4xx category are considered client error responses. These messages contrast with errors in the 5xx category, such as the 502 Bad Gateway Error. 500 errors are considered server error responses.

That said, the appearance of a 4xx error doesn’t necessarily mean the issue has something to do with the client (the web browser or device used to access the application). Oftentimes, if you’re trying to diagnose an issue with your own application, you can ignore most client-side code and components. This includes HTML, cascading style sheets (CSS), client-side JavaScript, etc. This doesn’t apply just to websites, either. Behind the scenes, normal web applications power smartphone apps that use a modern-looking user interface.

Although the 403 Forbidden Error is considered a client error response, you shouldn’t rule out the server as the culprit. The server network object is producing the 403 Error and returning it as the HTTP response code to the client. On the other hand, this doesn’t rule out the client as the actual cause of a 403 Forbidden Error, either. The client might be trying to access an invalid URL, the browser could be failing to send the proper credentials to the site, and so forth. We’ll explore some of these scenarios (and potential solutions) below.

Start With a Thorough Application Backup

Before making changes to your application, make sure to back up your system. This might include a full backup of your application, database, and so forth.

If you have the capability, create a complete copy of the application onto a secondary staging server that isn’t «live» or available to the public. This will allow you to test all potential fixes without threatening the security of your live application.

Diagnosing a 403 Forbidden Error

As previously mentioned, many 403 Forbidden Errors involve the server denying authorization to a client (a web browser, in most cases) that has requested content.

This typically occurs in one of two scenarios:

  • The client sent its authentication credentials to the server and the server authenticated that the client was valid. Yet, the server rejected the authorized client from accessing the requested content for some reason.
  • The requested content is strictly forbidden for all clients, regardless of authorization. This occurs when attempting to access an invalid or forbidden URL that the web server software has restricted. For example, Apache servers return a 403 Forbidden Error when a client tries to access a URL corresponding to a file system directory.

Troubleshooting on the Client-Side

Since the 403 Forbidden Error is a client error response code, start troubleshooting any potential client-side issues first.

Here are some troubleshooting tips you can try on the browser or device that is giving you problems.

Check the Requested URL

The most common cause of a 403 Forbidden Error is simply inputting an incorrect URL. As discussed before, many tightly secured web servers disallow access to improper URLs. This could be anything from accessing a file directory to accessing a private page meant for other users. Thus, it’s a good idea to double-check the exact URL that is returning the 403 error.

Clear Relevant Cookies

As you may already be aware, HTTP copies store tiny pieces of data on your local device. The website then uses these cookies to to «remember» information abbot a particular browser and/or device.

As you may already be aware, HTTP cookies store tiny pieces of data on your local device. The website then uses these cookies to «remember» information about a particular browser and/or device. Most modern web apps take advantage of these cookies to store user authentication status.

Invalid or corrupted Cookies can cause improper authentication for the server, leading to the 403 Error. This is due to the fact that the client is no longer authenticated to perform this particular request.

In most cases, you should only worry about cookies relevant to the website or application causing issues. The application stores cookies based on where the domain is located. This means you can only remove cookies that match the website domain (e.g. airbrake.io) to keep most other cookies intact. However, if you aren’t experienced with manually removing certain cookies, remove all cookies at once. Not only is this easier, but it’s also a safer option.

Below, we’ve provided a list on how to clear cookies depending on the browser you’re using:

  • Google Chrome
  • Internet Explorer
  • Microsoft Edge
  • Mozilla Firefox
  • Safari

Clear the Cache

Just like cookies, it’s also possible that the local browser cache could be causing the 403 Forbidden Error to appear.

A cache stores local copies of web content on your device for later use. A browser’s cache can include almost any type of data but typically stores compressed snapshots of webpages, images, and other binary data your browser often accesses. With a local copy of these resources on your device, your browser doesn’t need to spend time or bandwidth downloading this identical data every time you return to the same page. For example, when you open Facebook, there’s a good chance that the content you’re seeing has come from the cache on your device.

Since your browser’s cache stores local copies of web content and resources, it’s possible that a change to the live version of your application is conflicting with the cached version already on your device, which can sometimes produce a 403 Forbidden Error as a result. Try clearing your browser’s cache to see if that fixes the issue.

As with cookies, clearing the cache is browser-dependant, so here are a few links to that relevant documentation for the most popular browsers:

  • Google Chrome
  • Internet Explorer
  • Microsoft Edge
  • Mozilla Firefox
  • Safari

Log Out and Log In

If the application you’re using has some form of user authentication, the last client-side step to try is to log out and then log back in. If you’ve recently cleared the browser cookies, this should usually log you out, so the next time you try to load the page, just log back in at this point.

In some situations, the application may be running into a problem with your previous session, which is just a string that the server sends to the client to identify that client during future requests. As with other data, your device should have stored the session token (or session string) locally on your device within the cookies. The client then transfers this data to the server during every request. If the server fails to recognize the session token or the server sees this particular token as invalid, this may result in a 403 Error.

But, with most web applications, you can recreate the local session token by logging out and logging back in.

Debugging Common Platforms

If you’re running common software packages on the server that is responding with the 403 Forbidden Error, you may want to start by looking into the stability and functionality of those platforms first. The most common content management systems (CMS) — like WordPress, Joomla!, and Drupal — are all typically well-tested out of the box, but once you start making modifications to the underlying extensions or PHP code (the language in which nearly all modern content management systems are written in), it’s all too easy to cause an unforeseen issue that results in a 403 Error.

Here are a few tips to help you troubleshoot some of these popular software platforms:

Rollback Recent Upgrades

If you recently updated the CMS itself just before the 403 Forbidden Error appeared, you may want to consider rolling back to the previous version you had installed when things were working fine. Similarly, any extensions or modules that you may have recently upgraded can also cause server-side issues, so reverting to previous versions of those may also help.

For assistance with this task, simply Google «downgrade [PLATFORM_NAME]» and follow along. In some cases, however, certain CMSs don’t provide a version downgrade capability, which indicates that they consider the base application, along with each new version released, to be extremely stable and bug-free. This is typically the case for the more popular platforms.

Uninstall New Extensions, Modules, or Plugins

Depending on the particular CMS your application is using, the exact name of these components will be different, but they serve the same purpose across every system: improving the capabilities and features of the platform beyond what it’s normally capable of out of the box. Be warned: such extensions can, more or less, take full control of the system and make virtually any changes, whether it be to the PHP code, HTML, CSS, JavaScript, or database. As such, try uninstalling any recently added extensions. Again, Google the extension name for the official documentation and assistance with this process.

Check for Unexpected Database Changes

Uninstalling a CMS extension does not guarantee that changes will fully revert. This is particularly true for WordPress extensions. These extensions have carte blanche status within an application, which allows them full access rights to the database. With this access, an extension can modify database records that don’t «belong» to the extension itself. That means it can change records created and managed by other extensions of the CMS itself.

In those scenarios, the extension may not know how to revert alterations to database records, so it will ignore such things during uninstallation. Diagnosing such problems can be tricky. Your best course of action, assuming you’re reasonably convinced an extension is the likely culprit for the 403 Forbidden Error, is to open the database and manually look through tables and records that were likely modified by the extension.

Confirm Proper File Permissions

If the application worked fine before and suddenly this error occurs, permissions are not a very likely culprit. However, if modifications were recently made (such as upgrades or installations), it’s possible that file permissions were changed or are otherwise incorrect, which could cause an issue to propagate its way throughout the application and eventually lead to a 403 Forbidden Error. The majority of servers use Unix-based operating systems.

In this Wikipedia article, File-System Permissions, you’ll learn more about how to set up proper permissions for application files and directories to keep your application secure without hindering your applications’ access.

Above all, Google is your friend. Search for specific terms related to your issue, such as the name of your application’s CMS, along with the 403 Forbidden Error. Chances are you’ll find someone (or, perhaps, many someones) who have experienced this issue and have found a solution.

Troubleshooting on the Server-Side

If you’re confident that your CMS isn’t the problem, a 403 Error could be a result of a server-side issue.

Troubleshoot the server with these tips.

Check Your Web Server Configuration

Most modern web servers provide one or more configuration files to adjust server behavior. These configurations are based on a wide range of circumstances. For example, the server may be configured to reject requests to certain directories or URLs, which could result in a 403 Error.

Configuration options for each different type of web server can vary dramatically. Here is a list of a few popular ones to give you some resources to look through:

  • Apache
  • Nginx
  • IIS
  • Node.js
  • Apache Tomcat

Look Through the Logs

Nearly every web application will keep some form of server-side logs. Application logs contain the history of what the application did, such as which pages were requested, which servers it connected to, which database results it provided, and so forth. Server logs are related to the actual hardware that is running the application. They will often provide details about the health and status of all connected services, or even just the server itself. Google «logs [PLATFORM_NAME]» if you’re using a CMS, or «logs [PROGRAMMING_LANGUAGE]» and «logs [OPERATING_SYSTEM]» if you’re running a custom application, for more information on finding the logs in question.

Check the Database for User Authentication

As you know now, a 403 Error may indicate that the client properly authenticated at some point, but doesn’t have access to the requested resource. It’s worth checking the server to see why it denied the requested resource. Perhaps there’s an issue with the database and can’t authenticate the client.

Verify Server Connectivity

While it may sound simple, it’s entirely possible that a Forbidden Error simply indicates that a server somewhere in the chain is down or unreachable for whatever reason. Most modern applications don’t reside on a single server. Instead, applications may be spread over multiple servers or rely on third-party services to function. If any one of these servers are down for maintenance or otherwise inaccessible, this could result in an error that appears to be from your own application.

Debug Your Application Code or Scripts

If all else fails, manually debug your application by parsing through application and server logs. Ideally, make a copy of the entire application to a local development machine and perform a step-by-step debug process. This will allow you to recreate the exact scenario in which the 403 Forbidden Error occurred and view the application code at the moment something goes wrong.

But, for a faster way to debug, install Airbrake Error & Performance Monitoring. If there’s broken code that’s throwing a 403 Error, Airbrake will find it, and quickly. Create a free Airbrake dev account, today, and for the first 30-days, you’ll have access to unlimited error and performance events.

Note: We published this post in October 2017 and recently updated it in February 2022.

Did you just try to access your site only to be hit by some message telling you something is “Forbidden” or that you don’t have permission to access something on your site? If so, you’ve likely run into the 403 Forbidden error.

Seeing an error on your site can be frustrating and deflating, which is why we’ve created this detailed guide to help you fix the 403 Forbidden error and get your site functioning again as quickly as possible.

Let’s get started without any further introduction because we’re sure you just want to fix your site!

Check Out Our Video Guide on Fixing a 403 Forbidden Error on Your Site

What is the 403 Forbidden Error?

The 403 Forbidden error indicates that the server understands the request but can’t provide additional access. This means that the web page you’re trying to open in your browser is a resource that you’re not allowed to access.

Error Code 403
Error Type Authentication error
Error Variations Forbidden – You don’t have permission to access / on this server
403 – Forbidden: Access is denied
Error 403 – Forbidden
403 – Forbidden Error – You are not allowed to access this address
403 Forbidden – nginx
Error Causes Corrupt .htaccess file
Incorrect file permissions
Plugin issues

Like many other common errors, the 403 Forbidden error is an HTTP status code that a web server uses to communicate with your web browser.

403 forbidden error in Chrome

Note: We published this post in October 2017 and recently updated it in February 2022.

Did you just try to access your site only to be hit by some message telling you something is “Forbidden” or that you don’t have permission to access something on your site? If so, you’ve likely run into the 403 Forbidden error.

Seeing an error on your site can be frustrating and deflating, which is why we’ve created this detailed guide to help you fix the 403 Forbidden error and get your site functioning again as quickly as possible.

Let’s get started without any further introduction because we’re sure you just want to fix your site!

Check Out Our Video Guide on Fixing a 403 Forbidden Error on Your Site

What is the 403 Forbidden Error?

The 403 Forbidden error indicates that the server understands the request but can’t provide additional access. This means that the web page you’re trying to open in your browser is a resource that you’re not allowed to access.

Error Code 403
Error Type Authentication error
Error Variations Forbidden – You don’t have permission to access / on this server
403 – Forbidden: Access is denied
Error 403 – Forbidden
403 – Forbidden Error – You are not allowed to access this address
403 Forbidden – nginx
Error Causes Corrupt .htaccess file
Incorrect file permissions
Plugin issues

Like many other common errors, the 403 Forbidden error is an HTTP status code that a web server uses to communicate with your web browser.

403 forbidden error in Chrome

403 forbidden error in Chrome

Quick background on HTTP status codes – whenever you connect to a website with your browser, the web server responds with something called an HTTP header. Usually, this all happens behind the scenes because everything is working normally (that’s a 200 status code, in case you were wondering).

However, if something goes wrong, the server will respond back with a different numbered HTTP status code. While these numbers are frustrating to encounter, they’re actually quite important because they help you diagnose exactly what’s going wrong on your site.

The 403 Forbidden error means that your web server understands the request that the client (i.e. your browser) is making, but the server will not fulfill it.

In more human-friendly terms, it basically means that your server knows exactly what you want to do, it just won’t let you do it because you don’t have the proper permissions for some reason. It’s kind of like you’re trying to get into a private event, but your name got accidentally removed from the guestlist for some reason.

Other HTTP status codes mean different things. We’ve written guides on fixing issues with:

  • 404 not found errors
  • 500 internal server errors
  • 502 bad gateway errors
  • 504 gateway timeout errors.

What Causes the 403 Forbidden Error?

The two most likely causes of the 403 Forbidden Error are:

  1. Corrupt .htaccess file
  2. Incorrect file permissions

It’s also possible that you’re seeing the error because of an issue with a plugin that you’re using at your site. In this article, we’ll show you how to troubleshoot all of these potential issues.

403 Forbidden Error Variations

Like many other HTTP status codes, there are a lot of different variations for how this error code presents itself.

Here are some common variations that you might come across:

  • “Forbidden – You don’t have permission to access / on this server”
  • “403 – Forbidden: Access is denied”
  • “Error 403 – Forbidden”
  • “403 – Forbidden Error – You are not allowed to access this address”
  • “403 Forbidden – nginx”
  • “HTTP Error 403 – Forbidden – You do not have permission to access the document or program you requested”
  • “403 Forbidden – Access to this resource on the server is denied”
  • “403. That’s an error. Your client does not have permission to get URL / from this server”
  • “You are not authorized to view this page”
  • “It appears you don’t have permission to access this page.”

If you’re on an Nginx server, it will look like this below. Basically, if you see any mention of “forbidden” or “not allowed to access”, you’re probably dealing with a 403 Forbidden error.

What the 403 Forbidden Error looks like at Kinsta

What the 403 Forbidden Error looks like at Kinsta

How to Fix a 403 Forbidden Error?

To help you fix the 403 Forbidden Error on your site, we’ll cover nine separate troubleshooting steps in detail:

1. Refresh the Page and Double Check the Address

Sometimes the simplest solutions are the only ones capable of solving complex problems.

So try to refresh the page you are not able to access. The 403 error is often temporary, so maybe you’ll get lucky.

We also recommend checking that the URL is spelled correctly. If the address you are trying to access is a directory and not a web page, there is a chance that you will encounter a 403 error. (example: www.kinsta.com/wp-content/uploads/2023/05/)

2. Clear Your Browser Cache

Another very handy solution is to clear your browser’s cache.

Cache is very useful to help us see a website faster, but sometimes some mismatch can happen between the real version of a page and its cached version.

Check below some tips on how to clear cache in various browsers:

  • How to Force Refresh a Single Page for All Browsers
  • How to Clear Browser Cache for Google Chrome
  • How to Clear Browser Cache for Mozilla Firefox
  • How to Clear Browser Cache for Safari
  • How to Clear Browser Cache for Internet Explorer
  • How to Clear Browser Cache for Microsoft Edge
  • How to Clear Browser Cache for Opera

3. Modify Your File Permissions

Each folder and file on your site’s server has its own unique file permissions that control who can:

  • Read – see the data in the file/view the contents of a folder.
  • Write – modify the file/add or delete files inside a folder
  • Execute – run the file and/or execute it as a script/access a folder and perform functions and commands.

These permissions are indicated by a 3-digit number, with each digit indicating the level of permission for each of the 3 categories above.

Normally, these permissions just “work” for your site.

However, if something gets messed up with the file permissions at your site, it can cause the 403 Forbidden error.

To view and modify your site’s file permissions, you’ll need to connect via FTP/SFTP. Here’s how to use SFTP if you’re hosting at Kinsta.

For the screenshots in the tutorial below, we’ll be using the free FileZilla FTP program.

The basic principles will apply to any FTP program, though – you’ll just need to apply them to a different interface.

Once you’re connected to your server, you can view a file or folder’s permissions by right-clicking on it:

View file permissions in FileZilla

View file permissions in FileZilla

Of course, manually checking the permissions for each file or folder isn’t really an option.

Instead, you can automatically apply file permissions to all the files or folders inside of a folder.

According to the WordPress Codex, the ideal file permissions for WordPress are:

  • Files  – 644 or 640
  • Directories – 755 or 750

One exception is that your wp-config.php file should be 440 or 400.

To set these permissions, right-click on the folder that contains your site (the folder name is public at Kinsta). Then, choose File Attributes:

Bulk edit file permissions in FileZilla

Bulk edit file permissions in FileZilla

Enter 755 or 750 in the Numeric value box. Then, choose Recurse into subdirectories and Apply to directories only:

File permissions for WordPress directories

File permissions for WordPress directories

Once you’ve applied the correct permissions for directories, you’ll repeat the process for files. Only this time:

  • Enter 644 or 640 in the Numeric value box
  • Choose Recurse into subdirectories
  • Choose Apply to files only

File permissions for WordPress files

File permissions for WordPress files

To finish the process, you just need to manually adjust the permissions for your wp-config.php file to make them 440 or 400:

File permissions for wp-config.php file

File permissions for wp-config.php file

If file permissions issues were causing the 403 Forbidden Error, your site should now start working again.

4. Delete and Restore the .htaccess File

Kinsta uses the NGINX web server, so this potential issue doesn’t apply if you’re hosting your site at Kinsta because Kinsta sites do not have a .htaccess file.

However, if you’re hosting elsewhere and your host uses the Apache web server, one common cause of the 403 Forbidden error is a problem in your site’s .htaccess file.

The .htaccess file is a basic configuration file used by the Apache web server. You can use it to set up redirects, restrict access to all or some of your site, etc.

Because it’s so powerful, even if a little mistake can cause a big issue, like the 403 Forbidden error.

Rather than trying to troubleshoot the .htaccess file itself, a simpler solution is to just force WordPress to generate a new, clean .htaccess file.

To do that:

  • Connect to your server via FTP
  • Find the .htaccess file in your root folder
  • Download a copy of the file to your computer (it’s always a good idea to have a backup just in case)
  • Delete the .htaccess file from your server after you have a safe backup copy on your local computer

Delete the .htaccess file

Delete the .htaccess file

Now, you should be able to access your WordPress site if your .htaccess file was the issue.

To force WordPress to generate a new, clean .htaccess file:

  • Go to Settings → Permalinks in your dashboard
  • Click Save Changes at the bottom of the page (you do not need to make any changes – just click the button)

How to generate a new, clean .htaccess file

How to generate a new, clean .htaccess file

And that’s it – WordPress will now generate a new .htaccess file for you.

5. Deactivate and then Reactivate Your Plugins

If neither your site’s file permissions nor .htaccess file are the problems, the next place to look is your WordPress plugins. It could be a bug in a plugin or a compatibility issue between different plugins.

No matter what the issue is, the easiest way to find the problematic plugin is with a little trial and error. Specifically, you’ll need to deactivate all of your plugins and then reactivate them one by one until you find the culprit.

If you can still access your dashboard, you can perform this process from the normal Plugins area.

If you cannot access your dashboard, you’ll instead need to connect to your WordPress site’s server via FTP/SFTP (here’s how to connect via SFTP at Kinsta).

Once you’re connected to your server via FTP:

  1. Browse to the wp-content folder
  2. Find the plugins folder inside of the wp-content folder
  3. Right-click on the plugins folder and choose Rename
  4. Change the name of the folder. You can name it anything different, but we recommend something like plugins-disabled to make it easy to remember.

Rename the plugins folder

Rename the plugins folder

By renaming the folder, you’ve effectively disabled all the plugins at your site.

Now, try accessing your site again. If your site is working, you know that one of your plugins is causing the 403 Forbidden error.

To find the culprit, reactivate your plugins one-by-one until you find which plugin is causing the issue.

After changing the file name of the plugins folder, you should see a number of errors that say plugin file does not exist when you go to the Plugins area on your site:

What happens after renaming the plugins folder

What happens after renaming the plugins folder

To fix this issue and regain the ability to manage your plugins, use your FTP program to change the name of the folder back to plugins. So, if you renamed it to plugins-disabled, just change it back to plugins.

Once you do that, you’ll see the full list of all your plugins again. Only now, they’ll all be deactivated:

Reactivate your plugins one by one

Reactivate your plugins one by one

Use the Activate button to reactivate them one-by-one.

Once you find the plugin that’s causing the issue, you can either reach out to the plugin’s developer for help or choose an alternate plugin that accomplishes the same thing (we’ve collected the best WordPress plugins here).

6. Deactivate CDN Temporarily

If you’re getting 403 forbidden errors on your assets (images, JavaScript, CSS), it could be a problem with your content delivery network (CDN).

In this case, we recommend temporarily disabling your CDN and then checking your site to see if the issue is resolved. If you’re a Kinsta client, click through to your WordPress site within the MyKinsta dashboard, select CDN in the sidebar menu and then click the Disable button.

Screenshot of the MyKinsta dashboard revealing a Disbable button for the CDN.

Disabling the CDN within the MyKinsta dashboard.

7. Check to See If Hotlink Protection Is Misconfigured

Hotlinking is when someone adds an image to their site, but the hosted link is still pointed to someone else’s site. To prevent this, some will set up what is called “hotlink protection” with their host or CDN provider.

When hotlink protection is enabled, it will typically return a 403 forbidden error. This is normal. However, if you’re seeing a 403 forbidden error on something you shouldn’t be, check to make sure hotlink protection is configured properly.

8. Disconnect From Your VPN

Another simple tip, but that can solve this problem.

Some sites block VPN users, which may be why the 403 Forbidden message is showing up for you.

To verify this, disconnect from the VPN and try connecting to the site in another way. Or try switching to a different server provided by your VPN service.

9. Reach Out to Your Hosting Provider

If none of the above solutions worked for you, then we recommend reaching out to your hosting provider. They can most likely help you pinpoint the issue and get you back up and running. If you’re a Kinsta client, open up a support ticket with our team. We are available 24/7.

10. Use the Sitechecker Website Crawler Tool

The Sitechecker Website SEO Checker is able to provide you with a detailed SEO audit report by providing solutions and checkers for your website. There is a website crawler, a site monitoring tool, and a rank tracker amongst other built-in tools.

It’s important to constantly monitor your pages for 403 errors, and you can do this with Sitechecker. You can check your website not only for 403 errors but also for all other errors.

Summary

The 403 Forbidden error means that your server is working, but you no longer have permission to view all or some of your site for some reason.

The two most likely causes of this error are issues with your site’s file permissions or .htaccess file. Beyond that, some plugin issues might also cause the 403 Forbidden error. Or it could be that something is misconfigured with hotlink protection or your CDN.

By following the troubleshooting steps in this guide, you should be able to get your site back to working in no time.

Понравилась статья? Поделить с друзьями:
  • Ошибка 403 доступ запрещен что это значит
  • Ошибка 403 доступ запрещен причины
  • Ошибка 403 доступ запрещен пожалуйста проверьте
  • Ошибка 403 доступ запрещен обнаружена
  • Ошибка 403 доступ запрещен на яндексе