{"id":11744,"date":"2021-09-27T07:44:07","date_gmt":"2021-09-27T07:44:07","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=11744"},"modified":"2024-04-24T06:20:36","modified_gmt":"2024-04-24T05:20:36","slug":"set-up-custom-error-pages-whm","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/","title":{"rendered":"How to Set up Custom Error Pages with WHM?"},"content":{"rendered":"<p>You can redirect users to customized HTML pages whenever they encounter an error. For example, if users try to access an unavailable webpage, they will land on a custom error page you designed for the 404 error. You can set up custom error pages with WHM for your cPanel server.<\/p>\n<p>First you will have to create an alias for &#8220;<em>\/errorfolder<\/em>&#8221; in the <em>\/usr\/local\/apache\/conf\/httpd.conf<\/em> file.<\/p>\n<p>1. Log in to WHM with your root account.<\/p>\n<p>2. Select <strong>Server Configuration<\/strong> from the navigation menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11850\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_server_configuration.png\" alt=\"\" width=\"1919\" height=\"569\" \/><\/p>\n<p>3. Click on <strong>Terminal<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11807\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_terminal.png\" alt=\"\" width=\"1445\" height=\"485\" \/><\/p>\n<p>The terminal or SSH command-line interface will open.<\/p>\n<p>4. Enter the following code to create a directory in <em>\/usr\/local\/apache<\/em>. You will need it to store your custom error messages.<\/p>\n<pre class=\"lang:default decode:true\">mkdir \/usr\/local\/apache\/errorpages<\/pre>\n<p>Here, I have named the directory <em>&#8220;errorpages&#8221;<\/em>.<\/p>\n<p>After you have created an alias, you can proceed to set up\/ add the custom error pages to this folder.<\/p>\n<h2>To Set up Custom Error Pages<\/h2>\n<p>1. Select the <strong>Service Configuration<\/strong> option from the navigation menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12022\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_service_configuration.png\" alt=\"\" width=\"1919\" height=\"869\" \/><\/p>\n<p>2. Click on <strong>Apache Configuration<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12671\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/08\/whm_apache_configuration.png\" alt=\"\" width=\"1255\" height=\"249\" \/><\/p>\n<p>3. Click on <strong>Include Editor<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12672\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/08\/whm_apache_include_editor.png\" alt=\"\" width=\"1382\" height=\"638\" \/><\/p>\n<p>4. Go to the Pre Virtualhost Include section and select <strong>All Versions<\/strong>.<\/p>\n<p>5. Enter\/copy the following code in the <strong>Global<\/strong> text field.<\/p>\n<pre class=\"lang:default decode:true \">Alias \/errorfolder \/usr\/local\/apache\/errorpages\/\nErrorDocument 400 \/errorfolder\/400.shtml\nErrorDocument 401 \/errorfolder\/401.shtml\nErrorDocument 403 \/errorfolder\/403.shtml\nErrorDocument 404 \/errorfolder\/404.shtml\nErrorDocument 500 \/errorfolder\/500.shtml<\/pre>\n<p>6. Click the <strong>Update<\/strong> button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13082\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/whm_pre_virtualhost_include_error_pages.png\" alt=\"\" width=\"659\" height=\"425\" \/><\/p>\n<p>The Apache server will save the changes but, to apply them, the server needs to restart.<\/p>\n<p>7. Click on <strong>Restart Apache<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13083\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/whm_include_editor_restart_apache.png\" alt=\"\" width=\"1004\" height=\"382\" \/><\/p>\n<p>After restarting the server, the HTML pages you upload in the &#8220;<em>errorpages<\/em>&#8221; or the alias folder will act as the custom error pages for the websites on your WHM\/cPanel server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can redirect users to customized HTML pages whenever they encounter an error. For example, if users try to access an unavailable webpage, they will land on a custom error page you designed for the 404 error. You can set up custom error pages with WHM for your cPanel server. First you will have to [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,229],"tags":[1317,1315,1589,2498,1588,2499],"class_list":["post-11744","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos","category-whm","tag-custom-404-error-page","tag-custom-404-error-page-in-cpanel","tag-custom-error-pages","tag-custom-error-pages-whm","tag-error-pages","tag-error-pages-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Set up Custom Error Pages with WHM - Web Hosting FAQs by MilesWeb<\/title>\n<meta name=\"description\" content=\"This tutorial covers the entire process to set\/upload custom error pages from the WHM panel for the websites on your cPanel server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set up Custom Error Pages with WHM - Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"og:description\" content=\"This tutorial covers the entire process to set\/upload custom error pages from the WHM panel for the websites on your cPanel server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-27T07:44:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-24T05:20:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_server_configuration.png\" \/>\n<meta name=\"author\" content=\"Prasad Khartadkar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasad Khartadkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/\",\"name\":\"Set up Custom Error Pages with WHM - Web Hosting FAQs by MilesWeb\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_server_configuration.png\",\"datePublished\":\"2021-09-27T07:44:07+00:00\",\"dateModified\":\"2024-04-24T05:20:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\"},\"description\":\"This tutorial covers the entire process to set\/upload custom error pages from the WHM panel for the websites on your cPanel server.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_email_accounts_modify.jpg\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_email_accounts_modify.jpg\",\"width\":1903,\"height\":503},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set up Custom Error Pages with WHM?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\",\"name\":\"Prasad Khartadkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g\",\"caption\":\"Prasad Khartadkar\"},\"description\":\"Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/prasad-khartadkar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set up Custom Error Pages with WHM - Web Hosting FAQs by MilesWeb","description":"This tutorial covers the entire process to set\/upload custom error pages from the WHM panel for the websites on your cPanel server.","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:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/","og_locale":"en_GB","og_type":"article","og_title":"Set up Custom Error Pages with WHM - Web Hosting FAQs by MilesWeb","og_description":"This tutorial covers the entire process to set\/upload custom error pages from the WHM panel for the websites on your cPanel server.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2021-09-27T07:44:07+00:00","article_modified_time":"2024-04-24T05:20:36+00:00","og_image":[{"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_server_configuration.png","type":"","width":"","height":""}],"author":"Prasad Khartadkar","twitter_misc":{"Written by":"Prasad Khartadkar","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/","name":"Set up Custom Error Pages with WHM - Web Hosting FAQs by MilesWeb","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_server_configuration.png","datePublished":"2021-09-27T07:44:07+00:00","dateModified":"2024-04-24T05:20:36+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e"},"description":"This tutorial covers the entire process to set\/upload custom error pages from the WHM panel for the websites on your cPanel server.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_email_accounts_modify.jpg","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_email_accounts_modify.jpg","width":1903,"height":503},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/set-up-custom-error-pages-whm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Set up Custom Error Pages with WHM?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e","name":"Prasad Khartadkar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g","caption":"Prasad Khartadkar"},"description":"Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/prasad-khartadkar\/"}]}},"views":381,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/11744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=11744"}],"version-history":[{"count":3,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/11744\/revisions"}],"predecessor-version":[{"id":15522,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/11744\/revisions\/15522"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=11744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=11744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=11744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}