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 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 403 forbidden 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

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 may look like:

403 forbidden errorSave the file and upload to the server


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

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

55 thoughts on “Create Custom 403 Forbidden Error Page with no Plugin”

  1. 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!

    • Hi Carolyn,
      Why will someone attempt a forbidden page if there are no evil intentions buried behind the visit. I understand sometimes its by error. In any case, it’s not a bad idea to let that visitor know you were ready for him.

      Thanks for engaging on my blog πŸ˜‰

  2. 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!

    • Hey Sherman,
      Good to see you here and thanks for the comment
      I’m glad this post is meeting a need πŸ˜‰

      While I wish you a happy weekend, thanks once more for stopping by

  3. 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.


    • 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

  4. 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 πŸ™‚

  5. 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, the Internet marketing social networking site, and I “kingged” it and left this comment

  6. 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!

  7. 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…


    • Hey Angela,
      Good to see you around today. You keep to your words πŸ˜‰

      Well I’m glad your forbidden page already has something you can go with. However, this process will only help you create a more friendly page πŸ˜‰

      In any case, I wish you a happy weekend and hope to see you here again

  8. 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.

  9. 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.


  10. 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.

    • Hey Jon,
      Good to see you here and thanks for the engagement.
      Yes! I encourage readers to use their brains and transform that page to something else

      Hope to see you around again Jon πŸ˜‰

  11. 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.

  12. 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 – the content syndication,social aggregation website where this post was shared and bookmarked.

    Sunday –

  13. 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.

  14. 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!

    • Hi JAckson,
      I’m so excited to see you here today man and thanks for the comment and contribution

      The error you mean here is 404. That’s what comes up if the requested page is not found. WordPress by default will show you a list of recent posts, pages and categories. Meanwhile 403 error page is when a visitor tries to visit an unauthorized page or directory.

      That’s a bit, the difference between the two

      Thanks for making it a date with us here on my blog πŸ˜‰

  15. 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?


  16. 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.


  17. 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!!


    • Hey Terungwa,
      Your blog cannot be successful where some little issues are neglected. We must pay attention to these details.

      Thanks for visiting and adding a comment today. D have an excellent week

  18. 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

  19. 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.

  20. 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! πŸ™‚

    • I cannot agree more, Erik. Officially, Enstine is the the fastest rising blogger on the block right now and his posts will surely live long in the heart of both his readers and search engines!


  21. 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.

  22. 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.

    • Yes it’s good to keep plugins as low as possible

      Yes I have text on my demo but I’ll surely put up something more reasonable in a short while from now

      Thanks for the reaction sir

Comments are closed.