wesupport

Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to fix ‘You are not authorized to view this page (403 error)’ in WordPress sites

by | Oct 7, 2016

A common error that happens when you try to login to the WordPress admin section is ‘You are not authorized to view this page (403 error)’.

This 403 error gets displayed instead of the WordPress admin dashboard, after successful authentication using the admin login credentials.

What causes ‘You are not authorized to view this page (403 error)’

WordPress is programmed in PHP and the default page that loads once a admin user login, is the ‘index.php’ file.

The ‘Directory Index’ directive of a webserver is used to set the list of files to look for, when the client requests an index of the directory in a website.

But if the webserver where the WordPress site is hosted doesn’t support ‘index.php’ in ‘Directory Index’, this 403 error would show up instead of the index page.

 

‘You are not authorized to view this page (403 error)’ in WordPress

‘You are not authorized to view this page (403 error)’ in WordPress

 

In Apache webservers, ‘index.php’ would be already configured in ‘Directory Index’ section in the webserver configuration file. So, the 403 error is not seen much in Apache servers.

But in Windows servers, the ‘Default documents’ are used to configure ‘Directory Index’ for websites. The default documents that are enabled by default are:

  • Default.htm
  • Default.asp
  • Index.htm
  • Index.html

When a page request comes from a website, the IIS webserver checks the file names listed in this ‘Default Documents’ and sends it to the browser.

Since ‘index.php’ is not enabled as a Default document in Windows IIS server, this 403 error in WordPress is often encountered in Windows servers.

How to fix ‘You are not authorized to view this page (403 error)’

To update the Default Documents of your website to include ‘index.php’ file, follow these steps in Windows webserver:

  1. Open IIS Manager.
  2. Right-click the Web site for which you’ve installed WordPress and then click ‘Properties’.
  3. Click the ‘Documents’ tab. Click to select the ‘Enable Default Document’ check box.
  4. Click Add. In the Default Document Name box, type the name of the default document (index.php) that you want to add and then click OK.
  5. Refresh your browser or login again to http://domainname.com/wp-admin/

To enable ‘Default Documents’ for a website, another option is to make sure that the following entries are present in the web.config file in the root of the website.

 

web.config file entries to set index.php for WordPress

web.config file entries to set index.php for WordPress

 

Now we have enabled processing of index.php file by the web server, and your WordPress admin dashboard would be displayed fine without any errors.

If you are on a Linux server, to ensure that index.php is returned by default for a directory, create an .htaccess file in that directory and add this line to it:

DirectoryIndex index.php index.html

403 error can also happen due to a corrupt ‘.htaccess’ file or wrong file permissions. To fix this, ensure that the .htaccess and index.php files have 644 permissions.

In short

403 error can show in WordPress during installation or when trying to login as user. The error message can vary with server, some showing ‘Access Denied’.

Certain WordPress plugins or security plugins in the server can also lead to 403 errors. In such cases, examining the error logs and each plugin is relevant to resolve this error.

Bobcares engineers resolve website errors in both Windows and Linux servers promptly by examining the server logs and related files.

If you’d like to know how to manage your server resources efficiently for your business purpose, we’d be happy to talk to you.

 

 

Get a FREE consultation

Do you spend all day answering technical support queries?

Wish you had more time to focus on your business? Let us help you.

We free up your time by taking care of your customers and servers. Our engineers monitor your servers 24/7, and support your customers over help desk, live chat and phone.

Talk to our technical support specialist today to know how we can keep your service top notch!

TALK TO AN EXPERT NOW!




Bobcares provides Outsourced Hosting Support and Outsourced Server Management for online businesses. Our services include Hosting Support Services, server support, help desk support, live chat support and phone support.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags