Create Custom 403 Forbidden Error Page with no Plugin

The 403 Forbidden error page is a web page that means accessing the page or resource you were trying to reach is absolutely forbidden. In other words, this is a no-go area.

For the most part, access to forbidden pages or directories on blogs or websites is done out by visitors with evil intentions. However, genuine visitors for some reasons may find themselves 403’ed. That’s why we are trying to create a more user-friendly page to take care of this category of visitors.

Recommended reading: How to disable directory listing on your blog.  Directory listing is a security weakness so I encourage you check out this post.

Custom 403 forbidden error page – no plugin

There are literally many ways to create and host your own custom 403 error page. From editing the default error page in cPanel through the use of plugins to simply following the steps discussed in this post.

Personally, I don’t like going with plugins. You know what I mean? – extra load on my blog, security issues, etc so I have a pretty simple way to get a beautiful page up. No html or php coding skills needed.

The first step is to decide what to go on your custom error page. You may simply just want to tell the visitor ‘hey you are not allowed here’ or add some more stuffs to make it more engaging. I have even seen some error pages with subscription form. It’s really up to you to set anything there.

Create a page with basically anything you want

Custom 403 Forbidden Error Page

As illustrated above, you simply should create a WordPress page, publish and grab your page url.

Now you have your error page set. The next thing is to instruct the server to redirect to this page if someone tries to access any ‘no-go’ area on our blog.

So grab the .htaccess file at the root of your blog. Generally, you will need an ftp (File Transfer Protocol) program to connect and download this file from your server.

Another option is to use the cPanel’s online File Manager. Whatever the method you choose to use, paste the following code at the end of your file:

ErrorDocument 403 http://yourdomain.com/access-denied

NB: replace yourdomain with your real domain name. You may also want to replace access-denied with any url of your choice.

Here below is what it looks like

403 forbidden errorSave the file and upload to the server

Demo

Now let’s see if it works on my blog. Click the follow link:

http://enstinemuki.com/wp-includes/

That’s how simple it is. If you however still are not able to get this done, contact me so we can work a way out.

Let me hear your thoughts in the comment box

Don't Miss a thing! Enter your email address and get my next article delivered directly to you:

Delivered by FeedBurner



About Enstine Muki

Enstine Muki, Money making blogger, author of Blog Promotion Network and CashDonator wp Plugin and MyCommentAuthors Wordpress Traffic and Engagement free Plugin

Comments

  1. Thanks Enstine Muki,

    After fighting with WordPress loopholes, I was thinking about 403 Forbidden Error Page. Your tutorial helped me to solve this issue with a custom nice page. Thank you so much for nice idea and information.

  2. Hi Enstine,

    Another wonderful piece. This will help to reduce the plug-in usage for 403 forbidden error notifications.

    On your demo you’ve done it by texts, I think we can do it by custom images.

    Thanking you.
    Naveen recently posted…Top 20 Bootstrap Responsive WordPress Themes 2014My Profile

  3. Thank you, Enstine.

    WordPress security is definitely an important part of any blog strategy.
    Alex Ivanovs recently posted…How-To Stay Focused on The Road to Blogging SuccessMy Profile

  4. Another very useful article, Enstine!
    This is the kind of evergreen content that attract traffic forever.

    Thank you so much for sharing your knowledge.
    Have a fantastic week! :-)
    Erik Emanuelli recently posted…What is The Future of Guest BloggingMy Profile

  5. Enstine, anytime we can do something like this without a plugin I love it! Your instructions look pretty simple to follow too. Something I will be adding to my list to do soon. I would like to get creative as you mentioned with a possible sign up on it and other places for them to visit on the site. Thanks for sharing this great info with us.
    Lisa recently posted…Don’t Look At Your Triberr Stream While Baking BrowniesMy Profile

  6. Hi Enstine,
    Thanks for this initmation,
    Hey, I am yet to start my WP process so sofar no loopholes :-)
    I am sure very shortly I may face this, since I am planning to shift my base to WP :-)
    Anyways I am bookmarking this for my furthere reference and use :-)
    Keep informed
    Best Regards
    Phil

  7. Hello enstine,

    Very great article, I’ve been using few plugins to create 403 error pages. I’m gonna use your method to get it done.

    Thanks

  8. Hi Enstine!

    Nice! i have been waiting for this one~

    The old Htaccess trick, and no plugin. I like it very much indeed. Oh you can seriously play with this one, i was thinking a picture of a guy being thrown into a dumpster! hahaha

    Though, i think it would be easier if i could actually copy, and paste the code rather than a Gif image?

    Piyush

  9. Jackson Nwachukwu
    Twitter:
    says:

    Hi Enstine,
    I must say that your article has given me a heads up on what next to do on my blog. I don’t really know if this feature is part of what Genesis offers which automatically redirects you to a page that contains a list of your recent posts, categories and and of course link to your home page.

    I wish to implement this soon on my blog if this feature is different from the one that comes with Genesis…

    Cheers and thanks for an awesome piece!

  10. Hello Enstine,

    I so love the tips you are sharing here! To be a successful blogger, one should not just capitalize on churning in content and ranting on social media! These little things, small as they seem, can be the difference between failure and success!

    Keep the flow coming!!

    Always,
    Terungwa

  11. An instructive piece I must say. The steps are very clear, especially as with regards to the fact that plugin is not used.

    However, one thing that is not too clear for me is how to redirect the 403 forbidden error page on particular page or post I want hidden! The Cpanel details are not too clear!

    I have shared this comment in kingged.com – the content syndication,social aggregation website where this post was shared and bookmarked.

    Sunday – kingged.com

    http://kingged.com/create-custom-403-forbidden-error-page-with-no-plugin/

  12. Super tip here. Yeah these 403 pages are bad looking and if you can do something interesting or make it look good then that looks professional. Thanks for this cool tip on how to deal with the 403 page.
    Shalu Sharma recently posted…Religious tourism in IndiaMy Profile

  13. Hello Enstine
    This is awesome blog post….create custom 403 forbidden without Plugin.
    Nice write up
    Riya khurana recently posted…Why hugging is important in a relationshipMy Profile

  14. Thanks for sharing wonderful idea to create custom 403 forbidden error pages. I guess every one can easily follow the steps to create this custom pages.

  15. Jon Rhodes
    Twitter:
    says:

    Hi Enstine. This is handy to know. A 403 page is still a page on your blog, and it can be used to your advantage. For example you could put details of a latest offer, or a link to somewhere that might interest them.

  16. Hey Enstine,

    Okay now I can do this. You’ll be proud of me but early last year I set up my own 404 error page so I knew how to do that one but not this one.

    Thank you so much for these instructions so now I have to find the time to get this one created too.

    You’re the man! :-)

    Thank you Enstine.

    ~Adrienne
    Adrienne recently posted…Thankful Thursday: Search Traffic, SM Design, Monetizing, Spam, SnacksMy Profile

  17. Thank you Enstine,
    I was waiting for this turorial very eagerly. and Now I got it. I bookmarked it for later design of my 403 error page.
    Dk Patel recently posted…Why do Hindus worship a coconut and offer it to a deity ?My Profile

  18. This is very nice, Enstine, without the plugin! But I just tested my website and people try to access my forbidden area it already says “Forbidden” so I’m not sure if I should do anymore more on that. Anyway, I’m going to your other post to read more.

    Catch you later…

    Angela
    Angela McCall recently posted…Hostgator Sinking Like TitanicMy Profile

  19. You could help bloggers and marketers with this post Enstine. Not all are savvy with dealing errors. Great step by step tutorial about 403 Forbidden Error Page. A must share tutorial. Gonna share this to my friends.

    I found this post shared on Kingged.com, the Internet marketing social networking site, and I “kingged” it and left this comment

  20. Hi Enstine,
    Thank you very much for the clear, concise instructions. I always enjoy learning and am grateful to learn this as well.

    Have an excellent weekend!
    Bill
    William Butler recently posted…17 Awesome Benefits of Reading BooksMy Profile

  21. Hi Enstine,

    Instead of creating a “403 Forbidden” page, if we redirect the directory to home page, will there be any issue?
    Worli recently posted…How to Find The Right SEO Service For Small BusinessesMy Profile

  22. Hello Enstine,

    Thank you for your feedback :) Showing a forbidden page is kind of annoying so i prefer to redirect, but was not sure if its actually okay with the WordPress or search engines :)
    Worli recently posted…Four Tips to Boost Your Blog’s TrafficMy Profile

  23. Well hello Enstine thanks for the reminder about 403 pages.

    I have a download area that is non navigatable thanks to the htaccess settings but I have not customized the 403 page to help people who may attempt to type in the URL and make an error.

    Like you I am not keen on using plugins, in particular because that limits their use to WP installations and these error pages should be used on all of your sites. I did take a look at Leadpages but was not prepared to pay a monthly free for something I could get created with a single payment, I know it has many other advantages but they are not for me.

    Anyway if you are interested in a custom 404 page head over to my blog and create a wrong URL, if you like what you see, return to my blog and get in touch, I will happily give you a copy.

    igor
    igor Griffiths recently posted…Standing on the Shoulders of MinnowsMy Profile

    • Hi Igor,
      I’m so excited to see you on my blog today and thanks for the comment
      Johnchow talks so much about Leadpages but just like you, I can manipulate the htaccess file to get a lot of things done.

      I have been to your blog and created a wrong url and it took me to …errors/index.html

      Now, in your htaccess file, where you have ErrorDocument 403, just add another line ErrorDocument 404. That will handle the 404 error page. Looks quite simple isn’t it

      Thanks so much for offering to help.

      Hope to see you again around Igor as you have a wonderful weekend ahead
      Enstine Muki recently posted…ATTENTION!!! These TWO things will drastically increase traffic to your blog. Period!!!My Profile

  24. Hey Enstine,

    This is definitely a very valuable tip, especially to help protect you from anybody doing something malicious to your site as you mentioned. This is one way to keep us bloggers from using a plugin that will do this! Thanks for sharing!
    Sherman Smith recently posted…How Do You Build TrustRank?My Profile

  25. Carolyn Nicander Mohr
    Twitter:
    says:

    Hi Enstine, Very helpful. If we can avoid using plugins, that’s a great thing. I hadn’t paid any attention to my 403 page, is it just seen by people who are trying to hack your blog? If so, would it be better not to draw any extra attention from hackers?

    I’m glad you’ve also written a custom 404 page article. These are very helpful!