56

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:

https://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

Empower your blog with ThriveThemes Products!

forcusblog theme reviewThrive Themes is the Wordpress Revolution. All Themes Come With All the Features You'd Expect From a Top-Notch Premium Theme.

NB: This blog runs on Thrive Theme's FocusBlog Theme.


See Thrive Themes details here!
Click Here to Leave a Comment Below 56 comments
Carolyn Nicander Mohr - March 2, 2014

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!

Reply
Sherman Smith - February 28, 2014

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

Reply
Create Custom 403 Forbidden Error Page with no ... - February 28, 2014

[…] How to create a Custom 403 forbidden error page with no plugin. No requirement of PHP or HTML skills. Simply create a page in WordPress  […]

Reply
igor Griffiths - February 27, 2014

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

Reply
    Enstine Muki - February 27, 2014

    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

    Reply
Worli - February 17, 2014

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

Reply
Worli - February 9, 2014

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

Reply
William Butler - February 1, 2014

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

Reply
metz - February 1, 2014

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

Reply
Angela McCall - January 31, 2014

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

Reply
    Enstine Muki - January 31, 2014

    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
    Enstine Muki recently posted…My secret free blog traffic source revealed!My Profile

    Reply
Dk Patel - January 31, 2014

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

Reply
Adrienne - January 30, 2014

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

Reply
Jon Rhodes - January 30, 2014

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.

Reply
Samir - January 30, 2014

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.

Reply
Shalu Sharma - January 29, 2014

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

Reply
Sunday - January 29, 2014

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/

Reply
Riya khurana - January 29, 2014

Hello Enstine
This is awesome blog post….create custom 403 forbidden without Plugin.
Nice write up

Reply
Akaahan Terungwa - January 29, 2014

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

Reply
Jackson Nwachukwu - January 29, 2014

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!

Reply
Piyush Mathur - January 29, 2014

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

Reply
Mark - January 29, 2014

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

Reply
Philip V Ariel - January 29, 2014

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

Reply
Lisa - January 29, 2014

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

Reply
Erik Emanuelli - January 29, 2014

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

Reply
Alex Ivanovs - January 29, 2014

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

Reply
Naveen - January 29, 2014

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

Reply
Atul Kumar Pandey - January 29, 2014

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.

Reply

Leave a Reply:

CommentLuv badge

This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 3 approved comments. Use your real name and then @ your keywords (maximum of 3)
104 Shares
Tweet55
Share32
Share15
+12
WhatsApp