How to fix ‘You are not authorized to view this page (403 error)’ in WordPress sites
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.
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:
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.
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.