• Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
  • Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
Home/Article/Web Hosting/.htaccess/How to create custom 404 page using .htaccess

How to create custom 404 page using .htaccess

Written by VernalWeb
August 10, 2017

Very often we see an error report on our browser regarding 404 Not Found. Now a days most of the websites are using a beautifully styled custom error pages. You can easily set a custom error page with link back to your home page or other important pages using .htaccess. Let’s learn how to create custom 404 page using .htaccess.

How to create custom 404 page using .htaccess

STEP 1: Create a Web Page which you want to set as your custom 404 error page. Let’s say error404.php

STEP 2: Login to your cPanel Account. Upload it to your ‘public_html’ folder or to the root directory of your Website.

STEP 3: Open your .htaccess file in an editor & place the following code in it.

Options +FollowSymLinks
RewriteEngine on
ErrorDocument 404 https://www.yourwebsite.com/error404.php

Note: Replace yourwebsite.com with your domain name & don’t write the following codes if those already exists on your .htaccess.

Options +FollowSymLinks
RewriteEngine on

We hope this tutorial helps you find the perfect solution. If your like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing inhouse support staff. Check out our web hosting plans and have your website migrated today!

Tags:htaccess

Was this helpful?

Yes  No
Related Articles
  • How to create or edit .htaccess file in cPanel
  • How to Redirect HTTP Requests to HTTPS with .htaccess
  • How to enable hotlink protection using .htaccess Code
  • How to Create SEO Friendly URL Using .htaccess
  • How to create 301 redirection using .htaccess
  • How to force SSL using .htaccess file

Didn't find your answer? Submit Ticket

Latest Articles

  • How to show Hidden Files (.htaccess) in cPanel File Manager
  • Setup a Domain Redirection in cPanel
  • Create a MySQL Database and a User from cPanel
  • Remove page extensions using .htaccess
  • Cron Job Usage & Policy
  • © 2014 - 2025 VernalWeb. All rights reserved.