Http error 404 the requested resource is not found как исправить

Если на сайте появилась ошибка 404, значит ссылка на страницу не работает. Узнайте, как исправить ошибку Error 404 Not Found и даже сделать такую страницу полезной.

Ошибка 404, либо Error 404 Not Found — ошибка, которая появляется, если браузеру не удалось обнаружить на сервере указанный URL.

Страница 404.

Сообщение об ошибке 404

Что означает ответ 404

Error 404 Not Found отображается по-разному: «HTTP 404 не найден», «Ошибка 404 Not Found», «404 Страница не найдена». Смысл надписи всегда остаётся тем же: страница отсутствует либо просто не работает. Not Found в переводе означает «не найдено».

Ошибка 404 — классический код ответа по протоколу HTTP. Он свидетельствует, что связь с сервером установлена, но данных по заданному запросу на сервере нет.

Однако если просто ввести в поисковую строку произвольный набор символов, то браузер не покажет ошибку 404 Not Found — появится сообщение, что установить соединение с конкретным сервером невозможно.

Разберёмся в техническом формировании ответа Error 404 Not Found.

Техническая сторона вопроса. При связи по HTTP браузер запрашивает указанный URL и ждёт цифрового ответа. То есть любой запрос пользователя направляется на сервер размещения искомого сайта. Когда браузеру удаётся связаться с сервером, он получает кодированный ответ. Если запрос корректный и страница найдена, отправляется ответ с кодом 200 OK, что соответствует благополучной загрузке. При отсутствии страницы отправляется ответ об ошибке.

Что значит код «404». В ответе 404 первая четвёрка указывает на то, что запрос был чрезмерно длительным или в самом адресе была ошибка. Ноль предполагает синтаксическую неточность. Завершающая цифра кода отображает конкретную причину ошибки — «4» означает отсутствие данной ссылки.

Какие ещё ошибки бывают. Ошибку 404 не нужно путать с другими ответами, которые указывают на невозможность связи с сервером. Например, ошибка 403 сообщает, что доступ к URL ограничен, а ответ «Сервер не найден» свидетельствует, что браузер не смог обнаружить место размещения сайта.

Страница 404 от Google.

Google на 404 странице сообщает о возможных причинах ошибки

Причины ошибки

Причины, по которым HTTP возвращает ответ 404 Not Found:

  • Неверный адрес. К примеру, при ручном наборе пользователь допустил опечатку в адресе либо ссылка ведёт на несуществующую страницу. При этом домен должен быть написан верно. Если пользователь ошибется в названии домена, страница вообще не загрузится (без показа ошибки).
  • Битая ссылка. Это нерабочий URL, который никуда не ведёт. Данный вариант иногда возникает при внутренней перелинковке. К примеру, раньше страница существовала, а потом её удалили и забыли убрать ссылку.
  • Удалённая страница. Когда пользователь попытается перейти на удалённую с сервера страницу, он также увидит ошибку 404. Ссылка для перехода может сохраниться в браузерных закладках или на сторонних ресурсах.
  • Неправильный редирект на страницу с изменённым адресом. Допустим, в процессе редизайна URL изменили, но оставили без внимания связанные ссылки.
  • Неполадки на сервере. Это самый редкий вариант.

В большинстве ситуаций ошибка 404 отображается, когда не удаётся обнаружить нужную страницу на доступном сервере.

Несуществующая страница на сайте.

Причины отсутствия страницы на сайте бывают разными

Возможные последствия для сайта

Нужно ли считать 404 ошибку опасной для сайтов? Кажется, что нет ничего плохого в том, что пользователь не смог открыть одну веб-страницу. Однако если такая ситуация будет повторяться регулярно, это чревато оттоком аудитории. Одни пользователи решат, что сайт вовсе не существует. Другие подумают, что лучше не заходить на сайт, который работает с ошибками. Третьи будут игнорировать ресурс, на котором не смогли получить обещанную информацию.

Поисковые системы относятся к Not Found более лояльно. Например, Google отмечает, что 404 страницы не влияют на рейтинг. Но если при индексации роботы будут находить все больше ошибочных страниц, вряд ли это приведёт к более высокому ранжированию.

Если вы хотите улучшить взаимодействие с посетителями, важно найти и исправить все ошибки 404 на сайте.

Как выявить ошибку

На небольшом ресурсе легко проверить работоспособность ссылок вручную. Но если на сайте сотни и тысячи страниц, без дополнительного софта не обойтись. Есть немало сервисов и программ, позволяющих находить битые ссылки. Рассмотрим некоторые из них.

Search Console Google

Консоль поиска Google позволяет находить страницы с ошибкой 404 за несколько кликов:

  1. Войдите в учётную запись Google и перейдите в Search Console.
  2. Откройте раздел «Ошибки сканирования» → «Диагностика».
  3. Кликните на «Not Found».

Чтобы получить список страниц с ошибками, подтвердите права на ресурс — добавьте проверочную запись TXT в записи DNS регистратора домена. Такая запись не повлияет на работу сайта. Подробнее о процедуре подтверждения, читайте в справке Google.

Интерфейс Search Console Google.

Для использования Search Console Google нужно подтвердить свои права на сайт

Яндекс Вебмастер

Сервис для вебмастеров от Яндекса поможет быстро найти все ошибки 404:

  1. Откройте Вебмастер после авторизации в Яндекс-аккаунте.
  2. Выберите «Индексирование» → «Доступные для поиска страницы» → «Исключённые страницы».
  3. В выданном списке выберите фильтр «Ошибка HTTP: 404».

Чтобы использовать Яндекс.Вебмастер, также нужно подтвердить право владения сайтом — добавить метатег в HTML-код главной страницы.

Главная страница Яндекс.Вебмастер.

Для входа в Вебмастер авторизуйтесь в Яндексе

Screaming Frog

Для начала загрузите и установите программу на компьютер. После запуска добавьте URL проверяемого сайта и начните поиск проблем. Неработающие ссылки можно искать даже в бесплатной версии.

Сервис Screaming Frog.

Инструмент SEO-паук в Screaming Frog помогает найти технические неисправности сайта

SiteAnalyzer

Эта бесплатная десктопная программа позволяет обнаружить технические погрешности на сайте. SiteAnalyzer быстро отыщет нерабочие и несуществующие ссылки.

Страница загрузки SiteAnalyzer.

SiteAnalyzer бесплатно найдёт неработающие URL

Как исправить ошибку Not Found

Выбор конкретного решения зависит от причины ошибки:

  1. Ссылка ведёт в никуда из-за неверного URL. Для решения проблемы замените ошибочную ссылку на правильный адрес, чтобы сервер отдавал код 200 OK.
  2. Битая ссылка. Подобная ситуация не редкость при внутренней перелинковке страниц. К примеру, ссылка есть, а саму страницу давно удалили. Решений два: удалить ссылку или заменить её на другую.

Удалять и менять ссылки вручную удобно только на небольших сайтах. Исправление ошибок на крупных порталах лучше автоматизировать. Например, с помощью специальных плагинов для внутренней перелинковки (Terms Description, Dagon Design Sitemap Generator) и для автоматического формирования адресов страниц (Cyr-To-Lat).

Чтобы ошибки 404 появлялись как можно реже, достаточно соблюдать простые рекомендации:

  • Не присваивайте сложные адреса основным разделам сайта. Это снизит число ошибок, связанных с опечатками в URL.
  • Не меняйте адреса страниц слишком часто. Это неудобно для пользователей и вводит в заблуждение поисковых роботов.
  • Размещайте сайт на надёжном сервере. Это предотвратит ошибки, возникающие из-за неработоспособности сервера.

Мы разобрались, как найти и исправить ошибки Not Found внутри сайта. Но неработающая ссылка может быть расположена и на стороннем ресурсе. Допустим, когда-то на другом сайте разместили рекламную публикацию со ссылкой на определённую страницу. Спустя какое-то время страницу удалили. В этом случае появится ошибка 404. Устранить её можно, связавшись с администрацией ссылающегося сайта. Если же удалить/исправить ссылку нельзя, постарайтесь использовать ошибку с выгодой.

Как сделать страницу 404 полезной

Грамотно оформленная страница с ошибкой Error 404 Not Found — действенный инструмент конвертации посетителей. Ограничений по использованию страницы с ошибкой 404 нет. При этом практически все CMS позволяют настраивать дизайн этой страницы.

Что публиковать на странице 404:

  • меню с кликабельными ссылками;
  • ссылку на главную страницу;
  • анонс последних публикаций;
  • контакты для обратной связи.

При оформлении страницы-ошибки желательно опираться на рекомендации поисковиков:

  • Яндекс настоятельно рекомендует, чтобы страница контрастировала с основным содержанием сайта — иные цвета, другие графические приёмы либо их отсутствие. Необходимо чётко и понятно объяснить пользователю, что запрошенной страницы не существует и предложить другое решение.
  • Google советует придерживаться единого стиля оформления. Но также рекомендует понятно рассказать об ошибке и предложить полезные материалы.

Главное — по возможности отказаться от стандартной страницы 404. Подумайте, как привлечь внимание пользователя. Расскажите ему об отсутствии искомой страницы и предложите взамен что-то полезное или интересное.

Примеры оформления страниц 404

Designzillas

Мультяшная страница креативной студии привлекает внимание и её хочется досмотреть до конца. Если прокрутить страницу, можно увидеть, как из яйца вылупится дракон. При этом на странице есть ссылки на все основные разделы сайта.

404 страница на сайте Designzillas

Меню на сайте Designzillas есть и на 404 странице

Domenart Studio

Веб-студия «Домен АРТ» использует красочную страницу 404, оформленную в единой стилистике ресурса. Заблудившимся пользователям предлагают попробовать ещё раз ввести адрес или перейти в нужный раздел.

Страница 404 Domenart Studio.

Контакты, поиск, меню — и всё это на 404 странице Domenart Studio

E-co

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

Ошибка 404 «Эко Пауэр»

Ошибка 404 «Эко Пауэр» выглядит как страница входа

Дом со всем

Компания «Дом со всем», занимающаяся бурением скважин, разместила на странице 404 свои контакты и перечень услуг. Со страницы можно перейти в любой раздел сайта или заказать обратный звонок. С таким наполнением посетителю не нужно искать дополнительную информацию где-то ещё.

Страница 404 «Дом со всем».

Компания «Дом со всем» предлагает заказать обратный звонок

Kualo

Страница 404 на веб-хостинге Kualo может заставить пользователя забыть, зачем он сюда пришёл. Увлекательная игра притягивает внимание. В конце игры посетителю предлагают посмотреть сайт хостинга.

Cтраница 404 Kualo

На странице Kualo можно просто поиграть и заработать скидки

Рано или поздно с ошибкой 404 сталкивается большинство сайтов. При регулярной проверке можно своевременно исправить неработающие ссылки, чтобы в ответ пользователи получали код 200 OK. Но для крупного ресурса лучше настроить оригинальную страницу, которая будет отображаться при появлении ошибки Not Found и подскажет посетителям, что делать дальше.

Главные мысли

Ошибка 404 это

Ошибка с кодом 404 появляется у пользователя при попытке открыть страницу, которой не существует на сайте. Виной тому может быть битая ссылка или просто неверно введенный адрес, однако сама проблема появляется довольно часто, так что вопрос, как исправить ошибку 404, возникает как у владельцев сайтов, так и у обычных пользователей.

Причины появления ошибки с кодом 404

Из описания выше вы узнали, что значит рассматриваемая ошибка, однако не совсем понятна картина того, как она может появиться. Существуют четыре основные причины, из-за которых вместо стандартной загрузки страницы и появляется соответствующее уведомление. Выглядят они следующим образом:

  1. Неверный адрес. Чаще всего появляется, когда юзер вручную вводит адрес страницы или пытается перейти в несуществующий раздел сайта.
  2. Удаленная страница. Иногда страницы удаляются с сайта его владельцем, однако из поисковика они не пропадают еще некоторое время. Кроме того, прямые ссылки могут храниться в закладках у некоторых пользователей. Соответственно, при переходе и появится соответствующее уведомление об ошибке сервера.
  3. Битая ссылка. Такая страница когда-то действительно существовала, однако сбой произошел при перелинковке, и теперь ссылка ведет в никуда, что и влияет на возникновение проблемы.
  4. Проблемы функционирования сервера. Последняя причина появляется крайне редко и связана со сбоями на сервере, где размещен сайт.

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

Комьюнити теперь в Телеграм

Подпишитесь и будьте в курсе последних IT-новостей

Подписаться

Поиск битых ссылок на сайте

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

Яндекс.Вебмастер

Проще всего использовать сайт Яндекс.Вебмастер. Потребуется авторизоваться в сервисе и добавить собственный сайт, выполнив простые инструкции, которые будут отображаться на экране. После этого выполните такую последовательность действий:

Проверка сайта через Яндекс.Вебмастер при решении проблем с ошибкой 404

  1. Через левое меню откройте раздел «Индексирование».
  2. Там вас интересует категория «Страницы в поиске».
  3. Снизу перейдите на вкладку «Исключительные страницы».
  4. Задайте фильтрацию, чтобы сначала отображались результаты, где присутствует «ошибка 404: страница не найдена».

Google Search Console

Онлайн-сервис от известной компании Google Search Console функционирует примерно по такому же принципу, а для поиска проблемных страниц пользователю потребуется выполнить следующие действия:

Проверка сайта через Google Search Console при решении проблем с ошибкой 404

  1. Выполните вход и добавьте свой сайт. 
  2. Откройте раздел «Сканирование».
  3. Перейдите к категории «Ошибки сканирования».
  4. Используйте фильтр или самостоятельно ознакомьтесь с присутствующими ошибками.

Screaming Frog

Screaming Frog специализированное программное обеспечение, подходящее для сканирования сайтов. Если приведенные выше онлайн-сервисы вам не подошли, скачайте это решение с официального сайта, подключите к нему ваш сайт и произведите сканирование.

Проверка сайта через Screaming Frog при решении проблем с ошибкой 404

Благодаря данному инструменту у вас получится легко обнаружить все проблемные страницы, в том числе и страницы с другими ошибками сервера. 

Исправление ошибки 404

С принципом обнаружения проблемных страниц все понятно, однако как исправить ошибку 404 Page Not Found? Здесь все зависит непосредственно от возникшей ситуации, а также того, используется ли на сайте CMS. Давайте по очереди разберем каждую ситуацию.

При использовании CMS

Сейчас многие сайты создаются при помощи CMS. Это может быть WordPress, Joomla, 1С-Битрикс или какие-либо другие системы управления содержимым. Если проблема возникает на таком сайте, а на экране при переходе к сайту вы видите следующее изображение, значит, потребуется выполнить ряд действий для исправления неполадки.
Появление ошибки 404 от хостинга при использовании CMSВ первую очередь перейдите в корневую папку сайта и создайте там документ с расширением .htaccess. Он должен быть текстовым. Его содержимое зависит от конкретной используемой CMS. То есть необходимо прописать стандартные директивы, которые вы можете найти на официальном сайте reg.ru. Другие полезные материалы по настройке htaccess вы найдете тут и тут. 

Однако иногда неполадка может сохраняться даже при условии, что файл был создан или существовал изначально. Тогда не остается другого варианта, кроме как обратиться напрямую в техническую поддержку хостинга.

Описанная выше ситуация подразумевает, что ошибку 404 выдает сам хостинг, однако бывает, что она отображается от самой CMS, а в браузере это выглядит примерно следующим образом:

Появление ошибки 404 от CMS

В таких ситуациях вам необходимо проверить каждое название ссылки на правильность ввода, а также убедиться в том, что установленные SEO-плагины функционируют нормально и не влияют на проблемную генерацию ссылок. После проверки каждой ссылки ошибка http 404 должна исчезнуть.

Без использования CMS

Иногда сайты функционируют и без использования CMS. В таких ситуациях метод решения будет другим, поскольку, скорее всего, причина возникновения неполадки связана с отсутствием файлов в папке сайта или их неправильном расположении.
Появление ошибки 404 на сайте без использования CMSДля начала откройте корневую папку с файлом через панель хостинга и убедитесь в наличии всех необходимых элементов (например, html-страниц). В случае отсутствия потребуется загрузить их вручную и проверить, исчезла ли ошибка. Если же она сохранилась или файлы изначально находились в правильном месте, обращайтесь напрямую в техническую поддержку хостинга.

Только что мы разобрались с тем, что значит ошибка 404 Not Found, а также рассмотрели методы ее решения для разных ситуаций. Владельцу сайта нужно внимательно подойти к этому вопросу и всегда быть аккуратным при составлении адресов ссылок. От обычного же юзера требуется только соблюдать правильность ввода URL, если речь идет о ручном наборе в адресной строке браузера.

В статье мы расскажем, что означает ошибка 404 на сайте. Также она может называться:

  • 404 page not found,
  • http error 404,
  • error 404.

Ниже мы опишем, почему возникает ошибка 404, а также как её отследить и исправить.

404 ошибка (http error 404) — что это значит?

Ошибка 404 page not found — это код ответа сервера. Что это значит?

Когда вы вводите адрес сайта, браузер запрашивает его стартовую страницу у сервера. Если сервер не может найти страницу, он сообщает об этом браузеру с помощью кода 404. Это сообщение отображается на экране пользователя в браузере.

Почему такое может произойти? Есть несколько возможных причин:

  1. Вы допустили ошибку при вводе адреса страницы или при открытии файла в браузере. Или браузеру не удалось найти IP-адрес сервера. Сервер не может найти и выдать данные потому, что вы дали ему неправильные «координаты». В таком случае вам достаточно просто исправить ошибку в URL-адресе, и вместо страницы с ошибкой 404 появятся искомые страница/файл.
  2. Данные (страница или файл) не размещены на сервере, или CMS неверно отвечает на запрос пользователя. В этом случае дело обстоит сложнее и быстро справиться с проблемой не получится. Чтобы устранить ошибку 404, определите, как создавался сайт, на котором обнаружена ошибка (на CMS или без использования CMS). От этого будет зависеть способ решения проблемы.

Мы рассмотрим, что делать с ошибкой 404 и как исправить.


Как убрать ошибку 404 на сайте, созданном на CMS (WordPress, Joomla, 1С-Битрикс и т.д.)

На сайтах, созданных с использованием CMS, встречаются различные страницы с ошибкой 404 (http status 404). В зависимости от типа страницы с ошибкой различаются причины возникновения и пути решения проблемы:

  • Если вы видите на своём сайте стандартную ошибку 404 REG.RU:

В большинстве случаев проблема связана с отсутствием конфигурационного файла .htaccess. Как избавиться от ошибки 404? Создайте в корневой папке сайта пустой текстовый файл с расширением .htaccess и добавьте в него стандартные директивы для используемой CMS. Стандартные директивы приведены в статье: Файлы .htaccess для популярных CMS.

Важно: в панели управления cPanel файл .htaccess по умолчанию скрыт (т.е. он существует, но не виден). Следуйте инструкции, чтобы включить отображение файла. Затем сверьте его содержимое со стандартным.

Если файл .htaccess существует и его содержимое корректно, а ошибка 404 not found сохраняется, обратитесь в техническую поддержку.

  • Если вы видите иную страницу ошибки, которую отдает CMS сайта. Например:


Ошибка на WordPress


Пользовательская ошибка 404 not found

Возможно, страница не создана или не опубликована на этапе размещения сайта в админке CMS. Также ошибка может быть связана с формированием «человекопонятных» ЧПУ-ссылок с помощью SEO-плагинов. Чтобы избавиться от проблемы, необходимо обратиться к веб-разработчикам сайта или на тематические форумы, на которых представлена необходимая техническая информация (ошибка http 404).


Как быстро устранить ошибку 404 на сайте, созданном без использования CMS

На сайтах, созданных без использования CMS, код ошибки 404 отображается следующим образом:

Что означает это сообщение? Запрашиваемые страница/файл отсутствуют или размещены в неправильной папке (не в корневой папке сайта).

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

  • Если искомые файлы отсутствуют, следуйте инструкции: Как загрузить файл в корневой каталог сайта? После размещения файлов в корневой папке ошибка 404 должна исчезнуть.
  • Если файлы существуют и находятся в корневой папке, обратитесь в техническую поддержку.

Как находить и мониторить код ошибки 404?

Если вы владелец сайта, вы можете найти страницы с ошибкой с помощью специальных сервисов. Самые популярные сервисы:

  • Яндекс.Вебмастер,
  • Google Search Console,
  • Screaming Frog.

Ниже мы описали, как работать с каждым из них.


Яндекс.Вебмастер

  1. Авторизуйтесь в Яндекс.Вебмастер.

  2. Перейдите в раздел Индексирование — Страницы в поиске:


HTTP status 404 — что это

  1. Выберите Исключенные страницы:
  1. Добавьте фильтр, при котором отобразятся результаты с ошибкой «404 page not found»:


Google Search Console

  1. Авторизуйтесь в Google Search Console.

  2. Разверните блок Индекс и выберите Покрытие:


404 ошибка: что это

  1. Используйте фильтр, который покажет код ошибки 404. Для этого перейдите в раздел Сведения и кликните Отправленный URL не найден (ошибка 404):


Ошибка 404: что значит и как исправить


Screaming Frog

  1. Загрузите программу с официального сайта.

  2. Установите её на компьютер.

  3. Откройте программу, введите ссылку на сайт и нажмите Start:

  1. Перейдите во вкладку Response Code. Из выпадающего списка выберите фильтр Client Error (4xx):

Открывается только главная страница сайта, на внутренних страницах ошибка 404 или 500

Рассмотрим, что значит и как исправить ошибку отображения внутренних страниц сайта (error 404 или 500). Причиной проблемы является отсутствие файла .htaccess (либо он пустой, либо в нем не хватает необходимых директив для работы CMS). Решить проблему может замена текущего файла .htaccess стандартным для данной CMS.

На хостинге Linux

Если у вас ISPmanager, проверьте, не включены ли Автоподдомены. Если они включены, отключите их, проверьте актуальность проблемы.

В остальных случаях для устранения внутренней ошибки 404 или 500, перейдите в корневую папку сайта: Как узнать корневую папку сайта
Создайте файл .htaccess (или замените его) со следующим содержимым:


Файл .htaccess для Joomla

##

# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##
#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ ".xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section


Файл .htaccess для WordPress

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


Файл .htaccess для HostCMS

Options +FollowSymlinks
AddDefaultCharset Off

<IfModule mod_php4.c>

 php_flag magic_quotes_gpc off

 php_flag magic_quotes_runtime off

 php_flag register_globals off

</IfModule>

<IfModule mod_php5.c>

 php_flag magic_quotes_gpc off

 php_flag magic_quotes_runtime off
 php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
 DirectoryIndex index.php index.htm index.html
</IfModule>
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ /index.php
</IfModule>


Файл .htaccess для Bitrix

Options -Indexes 

ErrorDocument 404 /404.php


<IfModule mod_php5.c>

  php_flag allow_call_time_pass_reference 1

  php_flag session.use_trans_sid off

  #php_value display_errors 1

  #php_value mbstring.func_overload 2
  #php_value mbstring.internal_encoding UTF-8
</IfModule>

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
  RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
  RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresByType image/jpeg "access plus 3 day"
  ExpiresByType image/gif "access plus 3 day"
</IfModule>


Файл .htaccess для ModX

# MODx supports Friendly URLs via this .htaccess file. You must serve web

# pages via Apache with mod_rewrite to use this functionality, and you must

# change the file name from ht.access to .htaccess.

#

# Make sure RewriteBase points to the directory where you installed MODx.

# E.g., "/modx" if your installation is in a "modx" subdirectory.

#

# You may choose to make your URLs non-case-sensitive by adding a NC directive

# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]

RewriteEngine On
RewriteBase /

# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^example-domain-please-change.com [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www.example-domain-please-change.com [NC]
#RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
#
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
# https://www.domain.com when your cert only allows https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com.com/$1 [R=301,L]
#
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
#
# Make sure .htc files are served with the proper MIME type, which is critical # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
#AddType text/x-component .htc
#
# If your server is not already configured as such, the following directive
# should be uncommented in order to set PHP's register_globals option to OFF.
# This closes a major security hole that is abused by most XSS (cross-site
# scripting) attacks. For more information: http://php.net/register_globals
#
# To verify that this option has been set to OFF, open the Manager and choose
# Reports -> System Info and then click the phpinfo() link. Do a Find on Page
# for "register_globals". The Local Value should be OFF. If the Master Value
# is OFF then you do not need this directive here.
#
# IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
#
# Your server does not allow PHP directives to be set via .htaccess. In that
# case you must make this change in your php.ini file instead. If you are
# using a commercial web host, contact the administrators for assistance in
# doing this. Not all servers allow local php.ini files, and they should
# include all PHP configurations (not just this one), or you will effectively
# reset everything to PHP defaults. Consult www.php.net for more detailed
# information about setting PHP directives.
#
#php_flag register_globals Off
#
# For servers that support output compression, you should pick up a bit of
# speed by un-commenting the following lines.
#
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
#
# The following directives stop screen flicker in IE on CSS rollovers. If
# needed, un-comment the following rules. When they're in place, you may have
# to do a force-refresh in order to see changes in your designs.
#
#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/png A2592000
#BrowserMatch "MSIE" brokenvary=1
#BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
#BrowserMatch "Opera" !brokenvary
#SetEnvIf brokenvary 1 force-no-vary


Файл .htaccess для Drupal

#

# Apache/PHP/Drupal settings:

#


# Protect files and directories from prying eyes.

<FilesMatch ".(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(.php)?|xtmpl)$|^(..*|Entries.*|Repository|Root|Tag|Template)$">

  Order allow,deny

</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php index.html index.htm

# Override PHP settings that cannot be changed at runtime. See
# sites/default/default.settings.php and drupal_initialize_variables() in
# includes/bootstrap.inc for settings that can be changed at runtime.

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  <FilesMatch .php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Block access to "hidden" directories whose names begin with a period. This
  # includes directories used by version control systems such as Subversion or
  # Git to store control files. Files whose names begin with a period, as well
  # as the control files used by CVS, are protected by the FilesMatch directive
  # above.
  #
  # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
  # not possible to block access to entire directories from .htaccess, because
  # <DirectoryMatch> is not allowed here.
  #
  # If you do not have mod_rewrite installed, you should remove these
  # directories from your webroot or otherwise protect them from being
  # downloaded.
  RewriteRule "(^|/)." - [F]

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www. [NC]
  # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
  # RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Pass all requests not referring directly to files in the filesystem to
  # index.php. Clean URLs are handled in drupal_environment_initialize().
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ index.php [L]

  # Rules to correctly serve gzip compressed CSS and JS files.
  # Requires both mod_rewrite and mod_headers to be enabled.
  <IfModule mod_headers.c>
    # Serve gzip compressed CSS files if they exist and the client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -s
    RewriteRule ^(.*).css $1.css.gz [QSA]

    # Serve gzip compressed JS files if they exist and the client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}.gz -s
    RewriteRule ^(.*).js $1.js.gz [QSA]

    # Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule .css.gz$ - [T=text/css,E=no-gzip:1]
    RewriteRule .js.gz$ - [T=text/javascript,E=no-gzip:1]

    <FilesMatch "(.js.gz|.css.gz)$">
      # Serve correct encoding type.
      Header append Content-Encoding gzip
      # Force proxies to cache gzipped & non-gzipped css/js files separately.
      Header append Vary Accept-Encoding
    </FilesMatch>
  </IfModule>
</IfModule>


Файл .htaccess для NetCat

AddDefaultCharset windows-1251
ErrorDocument 404 /netcat/require/e404.php
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ /netcat/require/e404.php?REQUEST_URI=$1 [L,QSA]
</ifModule>


Файл .htaccess для DLE

DirectoryIndex index.php
RewriteEngine On
RewriteBase /
# Редиректы
RewriteRule ^page/(.*)$ index.php?cstart=$1 [L]
# Сам пост
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html(/?)+$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html(/?)+$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2&seourl=$3&seocat=$1 [L]
RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 [L]
RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html(/?)+$ index.php?newsid=$2&news_page=$1&seourl=$3 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html(/?)+$ engine/print.php?news_page=$1&newsid=$2&seourl=$3 [L]
RewriteRule ^([0-9]+)-(.*).html(/?)+$ index.php?newsid=$1&seourl=$2 [L]

# За день
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2&day=$3 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&day=$3&cstart=$4 [L]
# За весь месяц
RewriteRule ^([0-9]{4})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&cstart=$3 [L]
# Вывод за весь год
RewriteRule ^([0-9]{4})(/?)+$ index.php?year=$1 [L]
RewriteRule ^([0-9]{4})/page/([0-9]+)(/?)+$ index.php?year=$1&cstart=$2 [L]
# вывод отдельному тегу
RewriteRule ^tags/([^/]*)(/?)+$ index.php?do=tags&tag=$1 [L]
RewriteRule ^tags/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=tags&tag=$1&cstart=$2 [L]
# вывод для отдельного юзера
RewriteRule ^user/([^/]*)/rss.xml$ engine/rss.php?subaction=allnews&user=$1 [L]
RewriteRule ^user/([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 [L]
RewriteRule ^user/([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 [L]
RewriteRule ^user/([^/]*)/news(/?)+$ index.php?subaction=allnews&user=$1 [L]
RewriteRule ^user/([^/]*)/news/page/([0-9]+)(/?)+$ index.php?subaction=allnews&user=$1&cstart=$2 [L]
RewriteRule ^user/([^/]*)/news/rss.xml(/?)+$ engine/rss.php?subaction=allnews&user=$1 [L]
# вывод всех последних новостей
RewriteRule ^lastnews/(/?)+$ index.php?do=lastnews [L]
RewriteRule ^lastnews/page/([0-9]+)(/?)+$ index.php?do=lastnews&cstart=$1 [L]
# вывод в виде каталога
RewriteRule ^catalog/([^/]*)/rss.xml$ engine/rss.php?catalog=$1 [L]
RewriteRule ^catalog/([^/]*)(/?)+$ index.php?catalog=$1 [L]
RewriteRule ^catalog/([^/]*)/page/([0-9]+)(/?)+$ index.php?catalog=$1&cstart=$2 [L]
# вывод непрочитанных статей
RewriteRule ^newposts(/?)+$ index.php?subaction=newposts [L]
RewriteRule ^newposts/page/([0-9]+)(/?)+$ index.php?subaction=newposts&cstart=$1 [L]
# вывод избранных статей
RewriteRule ^favorites(/?)+$ index.php?do=favorites [L]
RewriteRule ^favorites/page/([0-9]+)(/?)+$ index.php?do=favorites&cstart=$1 [L]
RewriteRule ^rules.html$ index.php?do=rules [L]
RewriteRule ^statistics.html$ index.php?do=stats [L]
RewriteRule ^addnews.html$ index.php?do=addnews [L]
RewriteRule ^rss.xml$ engine/rss.php [L]
RewriteRule ^sitemap.xml$ uploads/sitemap.xml [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)/page/([0-9]+)/$ index.php?do=cat&category=$1&cstart=$2 [L]
RewriteRule ^([^.]+)/$ index.php?do=cat&category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)/rss.xml$ engine/rss.php?do=cat&category=$1 [L]
RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1 [L]
RewriteRule ^print:([^/]+).html$ engine/print.php?do=static&page=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+).html$ index.php?do=static&page=$1 [L]


Файл .htaccess для Opencart

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


Файл .htaccess для Webasyst

<FilesMatch ".md5$">
Deny from all
</FilesMatch>
DirectoryIndex index.php
Options -Indexes
# Comment the following line, if option Multiviews not allowed here
Options -MultiViews
AddDefaultCharset utf-8
<ifModule mod_rewrite.c>
RewriteEngine On
# Uncomment the following line, if you are having trouble
RewriteBase /
RewriteCond %{REQUEST_URI} !.(js|css|jpg|jpeg|gif|png|svg|ttf|eot|otf|woff|woff2)$ [or]
RewriteCond %{REQUEST_URI} apple-touch-icon.png$ [or]
RewriteCond %{REQUEST_METHOD} ^(POST|PUT|COPY|MOVE|DELETE|PROPFIND|OPTIONS|MKCOL)$ [or]
RewriteCond %{HTTP:Translate} ^.+$ [or]
RewriteCond %{HTTP_USER_AGENT} ^(DavClnt|litmus|gvfs|davfs|wdfs|WebDAV|cadaver|Cyberduck)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,QSA]
</ifModule>
<ifModule mod_headers.c>
<FilesMatch ".(jpg|jpeg|png|gif|js|css|svg|ttf|eot|otf|woff|woff2)$">
Header set Cache-Control "max-age=3153600, public"
</FilesMatch>
</ifModule>

Если у вас хостинг Windows

На хостинге Windows файл .htaccess не поддерживается. Его функцию выполняет файл web.config. Если вы наблюдаете внутреннюю ошибку 404 или 500 на хостинге Windows, рекомендуем обратиться к разработчикам сайта или на тематические форумы с вопросом, как убрать 404, заменив файл web.config.

Что будет, если не исправлять ошибку 404

Во-первых, есть риск потерять потенциальных клиентов. Когда пользователь не получает информацию, которую искал, он уходит на другой сайт, который ему предложил браузер. Если ошибка встречается на веб-ресурсе часто, можно потерять и уже имеющихся пользователей, так как они решат, что использование такого сайта небезопасно.

Во-вторых, есть риск потерять хорошую позицию в поисковой выдаче. Сама по себе страница с ошибкой 404 не вызывает у поисковой системы недоверия. Она просто удаляется из индексации. Однако там могли находиться ключевые слова, которые могли повлиять положительно на поисковую выдачу. Если на сайте много страниц с ошибкой, тогда поисковые роботы действительно могут отнестись с недоверием ко всему веб-ресурсу и сайт может потерять высокий рейтинг.

Сделайте страницу 404 полезной

Ошибка 404 (страница не найдена) может появиться в любое время. Важно, чтобы пользователь при входе на эту страницу не потерял доверия к сайту. Страницы с ошибкой 404 можно создавать самостоятельно. Например, если у вас сайт на WordPress или вы пользуетесь услугой REG.Site, страницу с ошибкой можно легко создать с помощью плагина 404page.

Вот несколько советов по созданию страницы:

  • дизайн этой страницы должен соответствовать всему ресурсу (цвет, шрифт, иллюстрации),
  • поместите ссылку на главную страницу,
  • добавьте дайджесты последних публикаций на сайте,
  • поместите контакты организации (номер телефона, адрес) и службы поддержки,
  • можно предложить действия для решения проблемы доступа к странице.

После посещения такой страницы посетитель хоть и не получит нужную информацию, однако у него останется положительное впечатление от посещения сайта, и в следующий раз он не откажется зайти на него снова.

Если перечисленные способы не помогли исправить ошибку, обратитесь в службу поддержки REG.RU.

Видеосправка. Об ошибке 404 и как создать страницу для неё

You know the page: you click on a link, but instead of getting the site you want, an error pops up indicating that the requested page is not available. Something along the lines of ‘404 Not Found’. A 404 error is the standardized HTTP status code. The message is sent from the webserver of an online presence, to the web browser (usually the client) that sent the HTTP request. The browser then displays this error code.

Contents

  1. How does a ‘404 error’ come about?
  2. How to fix the error ‘404 Not Found’
  3. HTTP 404 errors can damage a website’s ranking and reputation
  4. Identifing 404 errors on your own website
  5. Creating a 404 error page
  6. Why should you personalize your 404 error page?

How does a ‘404 error’ come about?

The typical trigger for an error 404 message is when website content has been removed or moved to another URL. There are also other reasons why an error message could appear. These include:

  • The URL or its content (such as files or images) was either deleted or moved (without adjusting any internal links accordingly)
  • The URL was written incorrectly (during the creation process or a redesign), linked incorrectly, or typed into the browser incorrectly
  • The server responsible for the website is not running or the connection is broken
  • The requested domain name can’t be converted to an IP by the domain name system (DNS)
  • The entered domain name doesn’t exist (anymore)

Dead links are often left for long periods of time since operators have no idea that the linked content has been deleted or moved. Many websites still appear in the search engineresults pages (SERPs) even though they aren’t available online anymore (or at least not at the specified URL). Other linked websites such as blogs, news portals, etc. are often not informed that the site has been removed or can now be found under a new URL. Many website operators don’t check their external links regularly and therefore a functioning link could easily become a dead one.

$1 Domain Names

Register great TLDs for less than $1 for the first year.

Why wait? Grab your favorite domain name today!

Matching email

SSL certificate

24/7/365 support

How to fix the error ‘404 Not Found’

A 404 error is rarely a reason to celebrate. At the end of the day, the website’s visitors have not found the content that they were looking for. However the appearance of a 404 page does not necessarily mean that the desired information is not available at all. In many cases, the solution to the original error is easily found and the visitor can be quickly directed to the web page that they were originally looking for. So how exactly can you go about achieving a 404 error fix? Our advice would be to try out these potential solutions (in the order that they are listed):

  • Reload the page: It might be that the error 404 has appeared for the simple reason that the page did not load properly. This can be checked quite easily by clicking on the ‘Refresh’ button in your browser or also by pressing the F5 button.
  • Check the URL: Regardless of whether you have entered the URL address manually or been directed via a link, could be that a mistake has been made. For this reason you should check the specified path of the website. It could be that either you, or the person who entered the link, has mistyped something. Apart from spelling mistakes, it could also be that forward slashes have been left out or misplaced. But bear in mind that this can only really be checked with ‘clean’ URLs, as they contain unreadable words instead of incomprehensible abbreviations, letters, numbers, and symbols.
  • Go back through the directory levels: For example, if a URL of the following structure example.com/Directory1/Directory2/Directory3 causes a 404 error page, then you can always go back to the previous directory level (in this example: example.com/Directory1/Directory2) in order to check whether the desired page is linked there. All you need to do is clear the last directory in the URL. The link for the page you are looking for should be visible on the previous page. If it is not to be found on that page then you can also go back to the previous page and look for the correct link there. But if it so happens that this method is also successful and you eventually end up back on the homepage, then move onto the next tip.
  • Use the website’s search function: Many websites offer a search function as part of their homepage. By entering one or several keywords, it can help you find the specific page that you are looking for.
  • Use a search engine: You also have the possibility of using the website of your choice to find a website. As long as the desired site exists, you should be able to find it by entering the website domain and/or a keyword transcription of the subject matter.
  • Delete the browser cache and cookies: Ifyou can access the website from another device, and the HTTP 404 error only seems to appear on a certain computer, then the problem could lie with your browser. Therefore you should delete the browser cache as well as all cookies for this site, and this may then finally allow you to access the page.
  • Contact the website: If none of the abovementioned tips have been successful then the only remaining option may be to get in touch with the person/people responsible for the website. Contact information can usually be found in the website’s masthead or else on a specific ‘Contact Us’ page. The operators of the website should be able to provide information as to whether the page you are looking for actually exists. It might be the case that the page in question has been moved to a new URL, and in this scenario you will be doing the website operator a big favor. They can then carry out a 404 error fix by introducing a domain redirect, which will automatically direct users from the old web page to the current one.

HTTP 404 errors can damage a website’s ranking and reputation

Search engines, such as Google and Bing, will have a negative impression of a site if it has many 404 errors. Once the crawlers have established that many requests are being met with 404 codes, it presumes the site isn’t very well maintained. Dead links affect a site’s ranking and Google can decrease its placement in the SERPs or even stop indexing it if there are too many 404 error pages occurring. This may result in a considerable decrease in visitor numbers for the website.

The visitor loses trust in the site if it’s full of broken links or if the landing page (the page that is accessed from the search engine results) is dead. If the site is experiencing this problem regularly, many users won’t take the trouble to continue to search since they aren’t even sure if the desired content is still available.

Identifing 404 errors on your own website

It’s important for website operators to prevent HTTP 404 pages. This applies to internal 404 error pages on their own website as well as external 404 error pages on other sites. There are numerous free tools available to help you find these broken links more easily. Three of the best and most well-known are:

  • Google Search Console (formerly known as ‘Google Webmaster Tools’): if you already have a Google account and have registered your website there, you should make use of the Google Search Console option. Any 404 errors found by the Google crawler are displayed in the web tool and can also be marked as corrected here too. Additional functions enable you to find errors in robots.txt files and use crawling statistics to work out how often your site has been crawled by Google crawlers.
  • Dead Link Checker: one of the simplest and fastest tools for finding both internally and externally linked 404 pages is the Dead Link Checker. With this web app you simply enter the URL of the site you want to inspect and then start the check. Here you have the choice of checking a single web page or a whole site. The app lists all the tracked error pages with status codes and URL.
  • W3C Link Checker: this online tool from World Wide Web Consortium (W3C) is particularly detailed when it comes to testing individual website pages, so the process takes longer to verify links than with other websites. The W3C Link Checker works just like the Dead Link Checker: you enter the URL and let the tool do the rest. It’s also possible to add further details

Creating a 404 error page

Some content management systems (CMS) like WordPress, Joomla and Drupal automatically generate a 404 error page when a website’s URL can’t be found. The HTTP 404 page is just a simple standard error message, but most of them can be personalized using special CMS extensions.

If your CMS doesn’t give you the option of creating or changing your 404 page, or if your website is solely based on HTML, PHP, etc., it will prove a bit more complicated. You can create an error page as follows:

  • Create an error page (‘404.html‘ or ‘404.php‘) in the root directory (if there isn’t an existing one already).
  • Open the .htaccess file (or create one if needed) in the root directory, enter this in ‘ErrorDocument 404 /404.html‘ and save the change. The error page will be generated with this code.
  • To see if it’s worked, try to access an unavailable webpage and hopefully the error 404 message should appear in the browser.

Why should you personalize your 404 error page?

Having a standard 404 error page is better than having none at all, although a customized page is more preferred for several reasons. On the one hand, you can be sure that visitors receive an accurate HTTP status code: for example, if the requested content is no longer present on the site, this should be conveyed with the ‘410 Gone‘ message. The visitor then knows that this content has been permanently deleted.

On the other hand, you can provide a specially-designed error page containing related links (i.e. links to your homepage or subpages where the content overlaps that which the visitor originally requested). You could even add a search function for your website. By taking these extra measures and providing incentives, you might be able to prevent visitors from leaving your site straight after seeing the 404 code.

With a creative 404 message you may even find that visitors are more forgiving. Naturally they will be disappointed at not finding content they were promised, but an original or funny 404 page could make up for it. If done properly, error pages do have some potential.

Make sure that the design of the error message matches the style of your website and you already have the foundation for a good 404 error page. If you let visitors know in a funny and light-hearted way that your content isn’t available, you’ll hopefully get a smile out of them and they won’t hold a grudge. For inspiration, check out our article on cool and creative 404 pages.

Related articles

The most important HTTP status codes at a glance

HTTP status codes and their meaning

404, 302, 503 – short number combinations with great significance. Users encounter server status reports time and time again and if you know how to interpret them you can act accordingly. Knowledge of HTTP codes is even more relevant for website owners. With the right know-how you can vastly improve user experience on your homepage, which will have an effect on the search engine ranking.

HTTP status codes and their meaning

The basics for modern web development

Modern web development: the basics

The trends driving web development are moving away from static web presences and heading increasingly in the direction of interactive content. Even though languages like HTML and CSS still rule the roost, a growing number of developers prefer the server-side programming language, PHP, for dynamic websites. Client-side script languages like JavaScript make it possible for a site to react to user…

Modern web development: the basics

How are websites accessed?

How are websites accessed?

In order to access a web page in a browser, you just have to enter the URL into the address bar in your web browser and the requested website will pop up on your screen. This seems simple enough, but the process that’s taking place in the background is a highly complex one. Learn about what happens when you access a website – from the URL translation to the relevant IP address via data transfer,…

How are websites accessed?

HTTP 400 Bad Request | finding the causes

HTTP 400: Bad Request explained

Internet users are often confronted with error messages. HTTP status codes can be especially annoying, and even more so if you don’t understand what they mean. The message ‘HTTP 400 – Bad Request’ is a mystery for many internet users, but luckily it can be solved in most cases. We explain what the error message means and how to fix the error.

HTTP 400: Bad Request explained

Windows blue screen

How to fix a Blue Screen of Death (BSOD)

The infamous blue screen of death usually shows up without any warning. It’s an important indicator of internal problems with hardware, software, or drivers. If Windows can no longer be run as a result of such a problem, then the forced shutdown takes place in the form of a blue screen containing an error message. This may cause unsaved files and documents to be lost. The most important thing with…

How to fix a Blue Screen of Death (BSOD)

В этой статье ответим на частые вопросы о странице 404, объясним, почему она важна для SEO, и покажем, как правильно ее оформить. 

Что такое ошибка 404 и почему она возникает

Ошибка 404 или Not Found появляется, если страница, на которую вы переходите, не найдена. Чтобы лучше понять, как возникает ошибка Not Found, рассмотрим этот процесс детально:

  • Переход по ссылке. Пользователь кликает ссылку на сайте или вводит URL в адресной строке браузера.
  • Отправка запроса на сервер. Браузер соединяется с сервером — физическим компьютером, где располагается сайт со всеми его файлами и базами данных. 
  • Ответ сервера. Браузер получает от сервера закодированный ответ с трехзначным кодом. Код показывает, как именно сервер обработал запрос браузера. 

Если соединиться с сервером не получилось, вы увидите сообщение «не удается получить доступ к сайту».

Если соединение с сервером установлено и страница, которую вы запросили, существует, браузер получит ответ с кодом 200 OK. Этот код означает, что сервер успешно обработал запрос и запрашиваемая страница будет загружена. А вот если страница, которую вы искали, не найдена, появится экран 404. 

Причины ошибки 404 Not Found:

  • Страница удалена.
  • Битая ссылка. URL, на который вы перешли, когда-то существовал, но был изменен. Адрес также мог быть введен с опечаткой, поэтому браузер не нашел страницу на сервере. 
  • Проблемы сервера. В редких случаях на сервере происходят сбои, которые провоцируют подобные ошибки.

Что такое ложная ошибка 404 и почему она возникает

Ложная ошибка появляется, когда браузер получает успешный ответ 200 OK, но все равно выводится сообщение 404 Not Found. Также можно увидеть страницу, на которой мало контента, или пустой экран. 

Причины ложной ошибки 404:

  • Некорректная настройка кода ответа: Для несуществующих страниц сообщение об ошибке 404 владелец сайта заменил на страницу-заглушку с кодом 200 OK. 
  • Недостаточное количество контента. На странице мало материалов или они отсутствуют.
  • Нет доступа к ресурсам. В корневом каталоге сайта помимо прочих находится файл robots.txt. Он содержит информацию для поисковых систем о том, какие ресурсы сайта можно сканировать, а какие — нет. Если в robots.txt заблокирован доступ к странице или каким-то ее файлам, это может вызывать ошибку Soft 404.
  • «Тяжелая» страница. На странице слишком много файлов или у них очень большой размер. Из-за этого страница загружается долго и в итоге провоцирует ошибку.

Чем вредны ошибки 404 для SEO 

Падает рейтинг сайта. Негативно влияют на SEO не столько страницы 404, сколько внешние URL-адреса, которые ссылаются на эти страницы. Большое количество таких адресов указывает на плохое качество сайта. Это может ухудшить индексацию ресурса и привести к потере его позиций в поисковой выдаче. Также возникает негатив со стороны пользователей — растут показатели отказов и снижается время взаимодействия с сайтом. 

Тратится краулинговый бюджет. У каждой поисковой системы есть бот, который анализирует страницы сайтов. Максимальное количество URL-адресов, которые он может обойти за один визит, называется краулинговым бюджетом. Ошибки 404 впустую тратят этот бюджет, поскольку вместо действительно важных страниц бот будет сканировать некорректные URL-адреса. 

Как найти внутренние и внешние ссылки на страницы 404

Битые ссылки бывают внутренние и внешние. Внутренние расположены на самом сайте и ведут на внутренние страницы своего же сайта. Внешние битые ссылки расположены на сторонних ресурсах и отправляют на страницы своего сайта. 

Обнаружить оба вида ссылок помогут бесплатные сервисы Яндекс.Вебмастер, Google Search Console, Xenu’s Link Sleuth, условно-бесплатный Screaming Frog SEO Spider Tool и платный Netpeak Spider. 

Яндекс.Вебмастер

Как найти внутренние ссылки: добавьте URL сайта → зайдите в панель «Ссылки» → «Внутренние ссылки».

Что делать с битыми ссылками

Внутренние битые ссылки нужно убрать или заменить на работающие URL-адреса. Проверять ресурс на наличие неработающих внутренних ссылок следует минимум раз в месяц.

Когда вы собрали внешние битые ссылки, нужно:

  1. Сделать выборку битых URL-адресов с сайтов, у которых ИКС больше 500. Это сайты с хорошей репутацией и посещаемостью, поэтому с них идет большой трафик. С битыми ссылками на этих ресурсах нужно разобраться в первую очередь.
  2. Настроить с этих ссылок переадресацию (301 редирект) на страницы с перемещенным или похожим контентом. Пользователь перейдет по битой ссылке, а попадет на ту страницу, которую вы укажете. Таким образом посетитель увидит материал, который ожидал, и не покинет сайт. 

Некоторые веб-мастера настраивают с внешних битых ссылок 301 редирект на главную страницу сайта. Это не очень хорошая практика. Например, посетитель при переходе по ссылке хотел увидеть каталог смартфонов, а попал на главную страницу интернет-магазина. Теперь он должен найти нужную категорию в меню и отфильтровать позиции, чтобы увидеть нужный товар. Такой сценарий может привести к тому, что покупатель покинет сайт. Поэтому 301 редирект на главную страницу используйте только в крайних случаях. 

Как оформить страницу 404 

Главная цель экрана 404 — объяснить юзеру, что произошло и какие действия дальше предпринять. Четких правил оформления страницы нет. Выделяют четыре основных варианта дизайна: развлекательный, рекламный, страница с поиском и карта сайта. 

Развлечь пользователя

Здесь могут быть встроены мини-игры или приложения, красивая анимация и интересные факты. Можно сделать ссылки на главную и другие страницы сайта. Но важно знать меру, поскольку есть риск, что пользователь так увлечется контентом, что забудет изначальную цель.

Ошибка 404 Not Found

Для многих людей постоянное нахождение на виртуальных просторах интернета давно стало важной потребностью. К сожалению, но и посещение разнообразных сайтов не всегда проходит без эксцессов – иногда человека может встретить надпись «error 404 not found», которая будет препятствовать пользователю в его стремлении посетить определенный ресурс. К счастью, большую часть информации можно найти в других местах, поэтому многие люде не парятся, а просто идут проводить свое время на альтернативные интернет-порталы. К сожалению, но иногда ошибка 404 not found не оставляет человеку шанса на посещение какого-либо уникального ресурса, без особенностей которого пользователь просто не может представить свою жизнь в ближайшие несколько часов.

Естественно, надо исправлять ситуацию. И помогут в этом всегда своевременные и актуальные советы от автора этого сайта.

Поиск решения следует начинать с ответа на вопрос – что это значит error 404 not found? Мы провели сотни бессонных ночей, не ели два часа, выпили полтора ящика пива, прежде чем смогли найти основные причины, которые могут приводить к состоянию «404 not found». Собственно всего их оказалось три:

  • Функциональность удаленного сервера была нарушена какими-то вредоносными процессами.
  • Владелец странички просто решил стереть данные из анналов историю, и удалил ее с просторов интернета.
  • Был совершен переезд. Да, да – банальный переезд! Владелец ресурса решил сменить адрес, поэтому искать сайт придется совершенно в другом месте.

В конце своей работы по выявлению первопричин этой неприятности перед нами открылась еще одна Истина, которая была скрыта в переводе фразы error 404 not found. Удивительно, но лучшие лингвисты современности смогли перевести это выражение, как — «ошибка, не найдено». Что еще раз подтвердило наши первоначальные выводы. После такой объемной работы можно переходить ко второму этапу, позволяющему понять то, как исправить 404 not found.

Выдает ошибку 404 Not Found - разбираемся в вопросе

Первый способ решения проблемы

Основывается он на банальной людской жадности. Все дело в том, что владельцы некоторых ресурсов, чтобы охватить по максимуму потенциальных посетителей своего сайта, регистрируют личное детище одновременно по разным адресам, вернее, доменным зонам.

Иногда владелец ресурса решает прекратить наличие регистрации своего портала в одной из зон и перестает вносить деньги за подобную услугу. Через какое-то время это приводит к возникновению «http error 404 the requested resource is not found», так как поставщик услуги аннулирует сделку.

Выход из положения прост – попытаться совершить вход на утраченный ресурс с помощью смены адреса – прежде всего, его доменной зоны.

Решение вопроса для социальников

Многие люди не плавают в глобальном интернете, предпочитая проводить время в различных социальных сетях. Аналогично некоторые интернет-пользователи решают развивать свой проект именно в подобных местах. Развивают они, развивают, и тут – бац – надоело им! Удалили страничку или администрация соцсети выполнила ее блокировку, подсчитав, что ресурс распространяет какие-либо гадости или занимается мошенничеством.

В итоге, перед ничего не подозревающим пользователем появляется надпись 404 not found в Вконтакте, Моем Мире, Фейсбуке или в другой социальной сети.

Что делать-то? Выхода два:

  • Забить и найти альтернативный ресурс.
  • Вычислить владельца странички и виртуально взять его за грудки. Спросить – почему не пашет его ресурс и как дальше жить?

Общие правила, способные помочь справиться с возникшей проблемой

Существует несколько правил, которые также рекомендуется проверить, прежде чем окончательно бить тревогу и начинать смешивать пиво с водкой:

  • Возможно, именно во время попытки захода на ресурс произошел кратковременный сбой в соединении. Выход – через некоторое время обновить страничку любым удобным для пользователя способом.
  • Внимательно перепроверить каждый символ, который используется в адресе требуемого ресурса.
  • Почистить кэш интернет-браузера, особенно если попытка зайти на ресурс с помощью другой программы заканчивается успехом.
  • Подождать некоторое время и повторить попытку входа – иногда причиной этой ситуации становятся технические работы со стороны интернет-провайдера.

Последний вариант

Последний способ касается самой неприятной первопричины, которая может блокировать вход на ресурс из соцсети даже владельцу сайта. Обычно она сопровождается предложением отправить смс-ку на такой-то номер (естественно, платную) или настойчивым требованием скачать 404 not found. В итоге, смена паролей не приводит к положительному результату, так как в системе уже поселилась одна вредоносная запись, блокирующая доступ к ресурсу.

Скажите спасибо, что у вас есть в друзьях доктор Ай-Тупит (не забывайте добавляться), который нашел решение этой проблемы:

  • Перейти по адресу C:windowssystem32driversetc.
  • Найти и открыть блокнотом файл «Hosts».
  • Удалить из него абсолютно все записи, сохранить, выполнить перезагрузку компа, попытаться зайти на ресурс – обычно этого достаточно для решения проблемы.

Ошибка 404 Not Found

Of the many potential errors you might see on your WordPress site, Error 404 Not Found is one of the tamer ones. But that doesn’t mean it isn’t frustrating when you or your visitors try to browse your site and keep running into the Error 404 Not Found message. 😒 That’s the last thing you want first-time potential customers seeing from your brand. A 404 error can also be an indicator to you that something has changed or moved and a 301 redirect probably needs to be added for SEO.

In this post, we’re going to try to help you get your site working again by explaining a few things:

Prefer to watch the video version?

What is the Error 404 Not Found?

The Internet Engineering Task Force (IETF) defines the error 404 Not Found as:

The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists. A 404 status code does not indicate whether this lack of representation is temporary or permanent; the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent.

Whenever you, or one of your visitors, visit your website, your browser sends a request to the web server and receives back data including something called an HTTP header. The HTTP header includes HTTP status codes to explain “what happened” with the request.

Most of the time, the request works perfectly and you never actually see the HTTP status code (unless you go looking). But if something goes wrong, your web browser will usually display a message with the HTTP status code to indicate the exact problem.

Just like other error messages (500 error, 502 error, 503 error, 504 error, etc.), the Error 404 Not Found message is the result of that process.

What Does Error 404 Not Found Actually Mean?

Basically, it means that the client (your, or your visitor’s, web browser) was able to successfully connect to the host (your website’s server), but it was unable to find the actual resource that was requested (e.g. a specific URL or filename).

For example, if someone tries to access yoursite.com/post-name but you don’t have any content with the slug post-name. The visitor will then see a 404 error because, even though your web server is functioning normally, the resource that was requested doesn’t exist.

It’s not just posts or pages either, any asset missing can generate a 404 error on the server, such as a missing image file, missing JavaScript, missing CSS, etc.

What Causes Error 404 Not Found on WordPress?

If you see this error on all of your site’s content, it’s typically due to an issue with your WordPress site’s permalinks. If you only see it on individual pieces of content, though, it’s most likely because you changed a piece of content’s slug without setting up a redirect.

Additionally, the 404 error isn’t always a bad thing – it’s only bad when it’s interfering with usability. And sometimes things are just out of your control!

For example, sometimes a person might just type the wrong URL in their address bar. In that case, they’ll still see a 404 error, but there’s no actual problem with how your site is configured. This is actually the desired response, and you can create your own custom 404 page to help get visitors to the right spot (we’ll show you how later on).

Error 404 Not Found Variations

Because different browsers display error messages differently, you might see a different message for this error. Other common variations include:

  • “Error 404”
  • “404 Not Found”
  • “HTTP Error 404”
  • “Not Found”
  • “Page Not Found”
  • “The requested URL was not found on this server.”
  • “The page cannot be found”
  • “We can’t find the page you’re looking for.”
  • “The requested URL /~ was not found on this server. That’s all we know.

Google 404 error page

Google 404 error page

The Error 404 Not Found message is also unique in that many sites will actually create a custom page to address the error, rather showing one of the messages above. Some WordPress themes also include custom 404 pages by default. For that reason, you might not actually see the error message at all because many sites will use funny or creative 404 pages instead.

Funny 404 page example

Funny 404 page example

Below is an example of our own 404 page at Kinsta. We include a search box and some of our recent blog posts to help visitors find what they might have been looking for. Always include search functionality on your 404 page.

Kinsta 404 page

Kinsta 404 page

Error 404 Not Found Impact on SEO

Error 404 Not Found doesn’t have any inherent negative impact on SEO. But it might have a negative impact depending on the reason for why the error is happening.

For example, if a visitor just mistypes a URL and sees a 404 error – there won’t be a negative impact on SEO. But if you have individual errors because of broken URLs, that will inhibit Google’s ability to properly crawl your site and have a negative SEO effect in that way.

Additionally, if a permalink issue is causing sitewide 404 errors, Google won’t be able to crawl any of your site’s content. In other words, always fix your 404 errors as soon as possible.

Error 404 Not Found Impact on Site Performance

Many don’t realize it, but sites that generate a lot of 404 errors can easily run into performance issues, as these responses aren’t typically cached. We saw this a lot on larger sites and it can be a big problem if you accidentally promote or get a surge of viral traffic to a 404 page. To minimize the impact of 404 requests on site performance, we automatically cache 404 pages for 15 minutes. If you create a new page with the same URL as the cached 404 page, we’ll automatically purge the cache so your visitors will be able to see the new page immediately. This means your site will be protected from PHP and CPU spikes caused by traffic to dynamic 404 pages.

You are probably generating more 404 errors than you think! Our MyKinsta analytics tool can help you determine the exact amount (as seen below).

404 Errors

404 Errors

You can also quickly see what the top 404 errors are. In this example below, you can see the site is missing some mobile icons, such as /apple-touch-icon.png. These are most likely in a theme or plugin’s code that is getting queried, but the actual icons were never added. Therefore, the server generates a 404 error as it can’t find the resources.

Top 404 errors

Top 404 errors

You can also check 404 errors in Google Search Console or install a third-party plugin such as Redirection which logs 404 errors. However, remember that plugins like these also have an impact on performance. It’s much better to rely on a server-level tool. That’s why we provide these tools for all Kinsta clients.

The reason these errors are bad is that many 404 pages are very resource intensive. For large sites, you’ll want to avoid a heavy 404 page. Create a simple 404 template that avoids querying the database any further if possible.

How to Fix Error 404 Not Found on WordPress

Below, we’ll cover a couple different methods for how to fix the Error 404 Not Found message, depending on whether it’s happening sitewide or to specific content.

Update Your WordPress Site’s Permalinks

If you’re experiencing sitewide 404 errors when trying to access content, the most likely cause is an issue with your permalinks (or your .htaccess file, if your host uses Apache). If you’re a Kinsta client, we utilize Nginx, so you can rule out the .htaccess file as a possible cause.

The easiest way to fix this is to update your permalink settings through the WordPress dashboard. All you need to do is go to Settings → Permalinks and click Save Changes (you don’t need to make any changes – clicking Save Changes is enough).

Regenerate permalinks in WordPress

Regenerate permalinks in WordPress

Set Up 301 Redirects For Moved or Renamed Content

If you’re experiencing 404 errors on a specific piece of content, the issue is likely that you:

  • Changed the URL slug for that content.
  • Moved that piece of content manually, e.g. by deleting the existing post and pasting it into a new post.

Users then try to access the content at the old location and see a 404 page instead of the resource they were expecting. The best way to fix this is to automatically redirect anyone who tries to access the old location to the new location. That way, they’ll make it to the right spot without any 404 errors. It’s also good for SEO. If you move or rename a post without adding a redirect, you lose all the domain authority attached to the backlinks pointed at that post.

WordPress by default will attempt to redirect changed/moved content. But it doesn’t always work and you should never rely on WordPress for this functionality. But don’t worry, there are several easy ways to set up redirects in WordPress:

First, you can use the free Redirection plugin to manage redirects from your WordPress dashboard. Once you’ve installed and activated the plugin, go to Tools → Redirection and enter the 404 page URL in the Source URL box and the new location of the content in the Target URL box:

How to set up redirects with the Redirection plugin

How to set up redirects with the Redirection plugin

If you’re hosting with Kinsta, you can also manage redirects from the MyKinsta dashboard. Using Kinsta’s tool is actually a better way to go about it as the rules are implemented at the server level, which is a much more optimal way in terms of performance. It also means one less third-party plugin you have to worry about.

Go to the site you want to manage. Then, click on the “Redirects” tab. To add a new redirect, click the large “Add Redirect Rule” button:

How to set up redirects from your Kinsta dashboard

How to set up redirects from your Kinsta dashboard

Finally, if your host uses the Apache server, you can use .htaccess to set up redirects. The .htaccess Generator site can help you generate the proper code to add to your site’s .htaccess file.

How to Create Your Own Error 404 Not Found Page

While you can do your best to prevent 404 errors by following the tips above, it’s impossible to entirely eliminate 404 errors because some things are just plain outside your control. It’s not uncommon for small WordPress sites to have thousands of 404 errors every month.

For example, if a visitor mistypes the URL, or if another website links to a page that doesn’t exist, people are going to get 404 errors no matter what.

To provide a more user-friendly error page, you can use one of the many 404 page plugins. For example, the free 404page plugin lets you set up a custom 404 error page with:

  • A search box
  • Important links
  • Contact information

Another important feature of the 404page plugin is that it doesn’t create redirects. A 404 page should never be redirected to a physical page such as yoursite.com/404. The 404 error should always be generated dynamically on the page in question.

By including these elements, you give visitors the tools they need to find their way to the right page. But remember, keep your 404 page light for better performance. Only include what is absolutely needed.

How to Monitor 404 Errors Going Forward

Going forward, it can be beneficial to pay attention to which requests are causing 404 errors at your site. This can help you:

  • Find broken links that are sending people to a non-existent resource (these could be internal links or external links from other sites). You’d then want to do your best to fix those links if at all possible.
  • See which pages Google is having trouble crawling. You’d then want to figure out why Google is trying to crawl a non-existent page and set up a redirect if needed.
  • Troubleshoot performance related issues with 404 errors.

Option 1 – Google Analytics

If you use Google Analytics, you can set up a custom report to track 404 errors from external links. Rebelytics has a good tutorial on the topic.

Option 2 – WordPress Plugin

If you want to use a WordPress plugin, the aforementioned Redirection plugin can help you monitor for 404 errors from your WordPress dashboard.

Option 3 – Third-Party Audit Tool

You can also use a third-party audit tool like Ahrefs to monitor for 404 errors on your WordPress site. You can even set this up to run on a schedule.

404 errors audit

404 errors audit

Option 4 – Google Search Console

Lastly, you can track 404 errors that Google’s crawlers encounter in Google Search Console. Once you’ve verified your site with Google Search Console, go to Crawl → Crawl Errors → Not found to view a list of 404 errors that Google has encountered. This is by far one of the easiest ways. It’s also the best in terms of performance because it requires no third-party plugins or additional scanning against your site. Google’s bots are already crawling your site on a regular basis, so why not simply take advantage of the data they already provide? 😉

Google Search Console 404 errors

Google Search Console 404 errors

Summary

Unfortunately, 404 errors will happen on your site whether you like it or not. The larger your WordPress site is, the more you’ll start seeing. We recommend getting a good workflow together for how you monitor these types of errors and go about fixing them. 404 errors are never good for visitors, your brand, and Google doesn’t like to see them either.

Have any other tips or questions regarding the Error 404 Not Found message or how it impacts your WordPress site? Let us know below in the comments.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

The error indicates that while the server itself is reachable, the specific page showing the error is not

Updated on December 7, 2022

A 404 error is an HTTP status code that means that the page you were trying to reach on a website couldn’t be found on their server.

To be clear, the error indicates that while the server itself is reachable, the specific page showing the error is not.

404 Not Found error messages are frequently customized by individual websites. So, keep in mind that the error might show up in just about any way imaginable depending on what website it’s shown from.

How You Might See the 404 Error

Here are some common ways in which you might see the HTTP 404 error displayed:

  • 404 Error
  • 404 Not Found
  • Error 404
  • The requested URL [URL] was not found on this server
  • HTTP 404
  • Error 404 Not Found
  • 404 File or Directory Not Found
  • HTTP 404 Not Found
  • 404 Page Not Found
  • Error 404. The page you’re looking for can’t be found.

These error messages can appear in any browser or any operating system. Most display inside the browser window just as web pages do.

In Internet Explorer, the message The webpage cannot be found usually indicates an HTTP 404 error but a 400 Bad Request error is another possibility. You can check to see which error IE is referring to by checking for either 404 or 400 in the title bar.

404 errors received when opening links via Microsoft Office applications generate a The Internet site reports that the item you requested could not be found (HTTP/1.0 404) message inside the MS Office program.

When Windows Update produces one, it appears as a code 0x80244019 or as the message WU_E_PT_HTTP_STATUS_NOT_FOUND.

Cause of HTTP 404 Errors

Technically, an Error 404 is a client-side error, implying that it’s your mistake, either because you typed the URL incorrectly or the page has been moved or removed from the website and you should have known.

Another possibility is if a website has moved a page or resource but did so without redirecting the old URL to the new one. When that happens, you’ll receive a 404 error instead of being automatically routed to the new page.

Microsoft IIS web servers sometimes give more specific information about the cause of 404 Not Found errors by suffixing a number after the 404, as in HTTP Error 404.3 — Not Found, which means MIME type restriction.

How to Fix the 404 Not Found Error

  1. Retry the web page by pressing F5, clicking/tapping the refresh/reload button, or trying the URL from the address bar again.

    The 404 Not Found error might appear for several reasons even though no real issue exists, so sometimes a simple refresh will often load the page you were looking for.

  2. Check for errors in the URL. Often times this error appears because the URL was typed wrong or the link that was selected points to the wrong URL.

  3. Move up one directory level at a time in the URL until you find something.

    For example, if www.web.com/a/b/c.htm gave you the 404 Not Found error, move up to www.web.com/a/b/. If you get nothing here (or an error), move up to www.web.com/a/. This should lead you toward what you’re looking for or at least confirm that it’s no longer available.

    If you have moved all the way up to the website’s home page, try to run a search for the information you’re looking for. If the site doesn’t have a search function, try navigating to the page you want using category links to dig deeper into the site.

  4. Search for the page from a popular search engine. It’s possible that you simply have the entirely wrong URL in which case a quick Google or Bing search should get you where you want to go.

    If you do find the page you were after, update your bookmark or favorite to avoid the HTTP 404 error in the future.

  5. Clear your browser’s cache if you have any indication that the 404 message might just be yours. For example, if you can reach the URL from your phone but not from your tablet, clearing the cache on your tablet’s browser might help.

    You might also consider clearing your browser’s cookies or at least the one(s) involved with the website in question if clearing the cache didn’t work.

  6. Change the DNS servers used by your computer, but usually only if an entire website is giving you a 404 error, especially if the website is available to those on other networks (e.g., your mobile phone network or a friend in another city).

    404s on an entire website isn’t particularly common unless your ISP or government filters/censors websites. No matter the reason, if it does happen, giving another set of DNS servers a try is a good step to take. See our Free and Public DNS Servers List for some alternatives and instructions on doing this.

  7. Contact the website directly. If they’ve removed the page you’re after then the 404 error is completely legitimate and they should be able to tell you that. If they’ve moved the page and are generating errors instead of redirecting visitors to the new page, they’ll be happy to hear from you so they can go fix it.

  8. Finally, if all else fails, wait. No, it’s not fun, but it might be your only course of action, especially if you’re confident the 404 error shouldn’t be happening (i.e., the page really should be at the URL you have and others are having the same problem and find it equally strange).

Errors Similar to Error 404

Some other client-side error messages related to the 404 Not Found error include 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 408 Request Timeout.

Several server-side HTTP status codes also exist, like the popular 500 Internal Server Error. You can see all of them in our HTTP Status Code Errors list.

FAQ

  • How do I fix error 404 messages on my website?

    If you’re aware of pages on your website with broken links, redirect or correct them. If a 404 error appears due to a deleted page, consider restoring or redirecting it to new and related content.

  • How do I fix error 404 on WordPress?

    If you use WordPress, 404 errors often pop up because of redirect conflicts or permalink issues. Fix broken links for individual pages or posts. Visit the WordPress dashboard and update permalink settings if it’s a site-wide problem. 

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Http error 404 php
  • Http error 404 not found python
  • Http error 404 localhost
  • Http error 404 https esia gosuslugi ru
  • Http 522 ошибка

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии