{"id":125372,"date":"2025-12-02T16:11:46","date_gmt":"2025-12-02T16:11:46","guid":{"rendered":"\/ph\/tutorials\/how-to-solve-403-forbidden-error"},"modified":"2026-03-10T09:33:01","modified_gmt":"2026-03-10T09:33:01","slug":"how-to-solve-403-forbidden-error","status":"publish","type":"post","link":"\/ph\/tutorials\/how-to-solve-403-forbidden-error","title":{"rendered":"How to fix the 403 Forbidden error (11 simple methods)"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>A 403 Forbidden error is an <strong>HTTP status code that blocks access due to permission or configuration issues<\/strong>. This error indicates that the server understands the request but refuses to authorize it, typically because of restricted permissions.<\/p><p>Keep reading as we walk you through actionable solutions to fix the 403 Forbidden error, from simple troubleshooting steps to more advanced server-side configurations:<\/p><ul class=\"wp-block-list\">\n<li>Clear browser cache and cookies.<\/li>\n\n\n\n<li>Temporarily disable your VPN.<\/li>\n\n\n\n<li>Scan for malware.<\/li>\n\n\n\n<li>Disable conflicting WordPress plugins.<\/li>\n\n\n\n<li>Turn off your CDN temporarily.<\/li>\n\n\n\n<li>Restore or regenerate the <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Reset file and directory permissions.<\/li>\n\n\n\n<li>Edit file ownership settings.<\/li>\n\n\n\n<li>Upload an index page.<\/li>\n\n\n\n<li>Verify your A record.<\/li>\n\n\n\n<li>Update your nameservers.<\/li>\n<\/ul><p>Additionally, potential causes that can trigger this error include:<\/p><ul class=\"wp-block-list\">\n<li><strong>Misconfigured file and folder permission settings<\/strong>. Prevents users from accessing sensitive files or certain parts of a website, often leading to a 403 Forbidden error.<\/li>\n\n\n\n<li><strong>Corrupt .htaccess file<\/strong>. Misconfiguration or malware can break the <strong>.htaccess<\/strong> code.<\/li>\n\n\n\n<li><strong>Missing index page<\/strong>. The <strong>index.html<\/strong> or <strong>index.php<\/strong> file, which is the default homepage template, isn&rsquo;t available in the website&rsquo;s directory.<\/li>\n\n\n\n<li><strong>Incompatible WordPress plugin<\/strong>. A WordPress plugin might be conflicting with another plugin or could&rsquo;ve been incorrectly configured.<\/li>\n\n\n\n<li><strong>Incorrect IP address<\/strong>. The domain name points to an inaccurate IP address, blocking access to your website.<\/li>\n\n\n\n<li><strong>Malware scan<\/strong>. Your website&rsquo;s security measures can limit access to specific resources to prevent malicious attacks.<\/li>\n\n\n\n<li><strong>New webpage link<\/strong>. The webpage link was recently updated, causing it to differ from the cached version.<\/li>\n\n\n\n<li><strong>Empty website directory<\/strong>. The URL is trying to access your website&rsquo;s directory instead of a file.<\/li>\n<\/ul><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/HTTP-Status-Codes-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">Download comprehensive HTTP status codes cheat sheet<\/a><\/p><p>\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-1-clear-your-browser-cache-and-cookies\">1. Clear your browser cache and cookies<\/h2><p>Browser cache stores outdated files, which can conflict with updated site permissions and trigger a 403 error. Cookies save login and preference data, and when they become corrupted or outdated, they may block access to some pages.<\/p><p>First, <a href=\"\/ph\/tutorials\/clear-browser-cache\">clear your browser cache<\/a> and cookies to remove any conflicting or outdated data. This forces the browser to fetch fresh files from the server, which can resolve access issues &ndash; though you&rsquo;ll need to log in again to most sites afterward.<\/p><p>Here&rsquo;s how to do it in Google Chrome (similar steps apply to Firefox and Safari):<\/p><ol class=\"wp-block-list\">\n<li>Click the three-dot icon in the top-right corner and select <strong>Settings<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>Privacy and security<\/strong> &rarr; <strong>Delete browsing data<\/strong>.<\/li>\n\n\n\n<li>In the time range menu, choose <strong>All time<\/strong>.<\/li>\n\n\n\n<li>Check <strong>Cookies and other site data<\/strong> and <strong>Cached images and files<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Delete data<\/strong> to remove them.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9bdeba\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"986\" height=\"934\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/10\/The-options-to-delete-browsing-history-cache-files-and-cookies-in-Chrome.png\" alt=\"The Delete browsing data dialog in Google Chrome\" class=\"wp-image-118977\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2021\/10\/The-options-to-delete-browsing-history-cache-files-and-cookies-in-Chrome.png 986w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2021\/10\/The-options-to-delete-browsing-history-cache-files-and-cookies-in-Chrome-300x284.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2021\/10\/The-options-to-delete-browsing-history-cache-files-and-cookies-in-Chrome-150x142.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2021\/10\/The-options-to-delete-browsing-history-cache-files-and-cookies-in-Chrome-768x727.png 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>After clearing cache and cookies, revisit the website and try logging in to see if the 403 Forbidden error is resolved.<\/p><h2 class=\"wp-block-heading\" id=\"h-2-temporarily-disable-vpn\">2. Temporarily disable VPN<\/h2><p>A virtual private network (VPN) routes your connection through remote servers. However, some websites block these servers for security or regional compliance, often resulting in a 403 error.<\/p><p>Temporarily disable your VPN and try accessing the website again. If this resolves the issue, switch to a different VPN server or contact your VPN provider for guidance.<\/p><p>If these simple checks don&rsquo;t solve the problem, move on to the next steps, which involve checking your website&rsquo;s security.<\/p><h2 class=\"wp-block-heading\" id=\"h-3-scan-for-malware\">3. Scan for malware<\/h2><p>Malware can insert harmful code into your website&rsquo;s files. This can change permissions or configuration rules, leading to restricted access and a 403 Forbidden response.<\/p><p>Scan your website for malware to identify and remove any harmful code. On <a href=\"\/ph\/web-hosting\">Hostinger web hosting plans<\/a>, you can use the built-in <strong>Malware Scanner<\/strong> in hPanel without third-party tools:<\/p><ol class=\"wp-block-list\">\n<li>Go to your website&rsquo;s dashboard, then select<strong> Security &rarr; Malware Scanner<\/strong> from the left sidebar.<\/li>\n\n\n\n<li>If no malware is found, you&rsquo;ll see your hosting plan&rsquo;s name and the time since the last scan.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9bfc14\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-websites-security-malware-scanner-1024x525.png\" alt=\"The Malware Scanner feature in hPanel\" class=\"wp-image-132423\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Otherwise, the tool will list the infected files and the actions taken to clean them.<\/li>\n<\/ol><p>For additional protection, use reputable <a href=\"\/ph\/tutorials\/wordpress-malware-scanner-plugins\">WordPress malware scanner plugins<\/a> like <strong>Wordfence<\/strong> or <strong>Solid Security<\/strong>. These tools detect threats in real time and block suspicious activity before it can cause further issues.<\/p><p>If the scan reveals infections, clean or replace the affected files, then recheck your site to confirm the 403 error is gone.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-full\"><a href=\"\/ph\/web-hosting\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/11\/Web-hosting_in-text-banner.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/11\/Web-hosting_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/11\/Web-hosting_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/11\/Web-hosting_in-text-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-4-disable-wordpress-plugins\">4. Disable WordPress plugins<\/h2><p>Faulty or incompatible WordPress plugins may override permission settings. When this happens, affected pages can become inaccessible and return a 403 Forbidden error.<\/p><p>Disable your WordPress plugins to determine if one is causing the issue. You can do this from your WordPress dashboard or <a href=\"https:\/\/support.hostinger.com\/en\/articles\/4411258-how-to-disable-wordpress-plugins-without-access-to-the-admin-page\" target=\"_blank\" rel=\"noopener\">directly in hPanel<\/a> if you&rsquo;re a Hostinger customer:<\/p><ol class=\"wp-block-list\">\n<li>From your website&rsquo;s dashboard, go to <strong>WordPress &rarr; Security<\/strong>.<\/li>\n\n\n\n<li>Scroll down to the <strong>Installed plugins<\/strong> section.<\/li>\n\n\n\n<li>Toggle each plugin off individually and check your site after each change.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c2424\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-websites-wordpress-security-installed-plugins-1024x624.png\" alt=\"The Installed plugins section in hPanel\" class=\"wp-image-132425\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If you prefer a manual method, you can disable all plugins at once via the file manager or an FTP client:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to the <strong>wp-content<\/strong> folder in <strong>public_html<\/strong>.<\/li>\n\n\n\n<li>Rename the <strong>plugins<\/strong> folder to <strong>disabled-plugins<\/strong>. This will deactivate all plugins simultaneously.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c2d2d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"1009\" height=\"352\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hostinger-filemanager-disabledplugins.png\" alt=\"Hostinger File Manager highlights the disabled-plugins directory\" class=\"wp-image-100204\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-disabledplugins.png 1009w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-disabledplugins-300x105.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-disabledplugins-150x52.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-disabledplugins-768x268.png 768w\" sizes=\"(max-width: 1009px) 100vw, 1009px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Check your website. If the error is gone, one of the plugins is the culprit.<\/li>\n\n\n\n<li>Rename the folder back to <strong>plugins<\/strong> to reactivate them.<\/li>\n\n\n\n<li>From your WordPress dashboard, deactivate plugins one by one to identify the problematic one.<\/li>\n<\/ol><p>Once you&rsquo;ve found the plugin causing the error, update it or remove it entirely.<\/p><p>If security-related fixes don&rsquo;t work, the next steps address server configurations and file settings.<\/p><h2 class=\"wp-block-heading\" id=\"h-5-temporarily-disable-cdn\">5. Temporarily disable CDN<\/h2><p>A <a href=\"\/ph\/tutorials\/what-is-cdn\">content delivery network (CDN)<\/a> stores cached copies of your site across multiple servers, and outdated or misconfigured cache can lead to a 403 status code.<\/p><p>If your website uses a CDN, temporarily turn it off to check if it&rsquo;s serving the error instead of your origin server. Hostinger automatically enables the <strong>in-house CDN<\/strong> for the <strong>Business<\/strong> web hosting plan and above. To disable it in hPanel:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>Performance &rarr; CDN<\/strong>.<\/li>\n\n\n\n<li>In the CDN status section, hit <strong>Disable<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c4262\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-websites-performance-cdn-disable-highlighted-1024x202.png\" alt=\"The Disable button in the CDN menu of hPanel\" class=\"wp-image-132426\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>If this resolves the problem, keep the CDN disabled temporarily and contact our support for further troubleshooting.<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-6-restore-the-htaccess-file\">6. Restore the .htaccess file<\/h2><p>A corrupted or misconfigured <strong>.htaccess<\/strong> file can apply incorrect server rewrite or access rules, blocking visitors and returning a 403 Forbidden error.<\/p><p>If recent changes or malware have altered your <strong>.htaccess<\/strong> file, replace it with a clean version. If you&rsquo;re using Hostinger, you can <a href=\"\/ph\/tutorials\/locate-and-create-htaccess\">create a new .htaccess file<\/a> through hPanel&rsquo;s File Manager:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>Files &rarr; File Manager<\/strong> in your website dashboard.<\/li>\n\n\n\n<li>Open the <strong>public_html<\/strong> directory and locate the <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Right-click the file and select <strong>Download<\/strong> to create a backup.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c4b30\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"826\" height=\"430\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hostinger-filemanager-download-1.png\" alt=\"The Download option in hPanel's File Manager\" class=\"wp-image-100195\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-download-1.png 826w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-download-1-300x156.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-download-1-150x78.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-download-1-768x400.png 768w\" sizes=\"(max-width: 826px) 100vw, 826px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Delete the current <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Click <strong>New file<\/strong> and name it <strong>.htaccess<\/strong> without any extensions.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c5389\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"616\" height=\"372\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/hostinger-filemanager-newfile.png\" alt=\"The CREATE button in hPanel's File Manager\" class=\"wp-image-100196\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-newfile.png 616w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-newfile-300x181.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/hostinger-filemanager-newfile-150x91.png 150w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"6\" class=\"wp-block-list\">\n<li>Paste the following default code and save the file:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Enable URL Rewriting\nRewriteEngine On\n# Rewrite rule to redirect requests to index.php\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^(.*)$ index.php?\/$1 [L]<\/pre><p>For WordPress websites, you can also regenerate the file without using File Manager:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your WordPress dashboard.<\/li>\n\n\n\n<li>Go to <strong>Settings &rarr; Permalinks<\/strong>.<\/li>\n\n\n\n<li>Hit <strong>Save Changes<\/strong> without modifying any settings.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c5ab8\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"900\" height=\"216\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/wordpress-permalinks.png\" alt=\"WordPress Permalinks section highlights the Save Changes button\" class=\"wp-image-100197\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/wordpress-permalinks.png 900w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/wordpress-permalinks-300x72.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/wordpress-permalinks-150x36.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/wordpress-permalinks-768x184.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>After restoring <strong>.htaccess<\/strong>, try accessing your site again. If the error disappears, the file was likely the cause.<\/p><h2 class=\"wp-block-heading\" id=\"h-7-reset-file-and-directory-permissions\">7. Reset file and directory permissions<\/h2><p>File permissions control access to your website&rsquo;s data. When a file is too restrictive, the server blocks access for security reasons, resulting in a 403 Forbidden error.<\/p><p>If your file permissions are incorrect, you can easily reset them in just one click using Hostinger&rsquo;s built-in <strong>Fix File Ownership<\/strong> tool:<\/p><ol class=\"wp-block-list\">\n<li>In hPanel, search for <strong>Fix File Ownership<\/strong>.<\/li>\n\n\n\n<li>Select the checkbox to confirm and hit <strong>Execute<\/strong>. The tool will automatically set default permissions for all website files and folders.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c7054\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-websites-advanced-fix-file-ownership.png\" alt=\"The Fix File Ownership menu in hPanel\" class=\"wp-image-132428\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Alternatively, you can reset file permissions manually using an <a href=\"\/ph\/tutorials\/filezilla-ftp-configuration\">FTP client like FileZilla<\/a>:<\/p><ol class=\"wp-block-list\">\n<li>Connect FileZilla to your website.<\/li>\n\n\n\n<li>Right-click the <strong>public_html<\/strong> directory and select <strong>File Attributes<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c7821\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"566\" height=\"330\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/ftp-fileattributes.png\" alt=\"FileZilla FTP highlights the File Attributes option\" class=\"wp-image-100199\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes.png 566w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-300x175.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-150x87.png 150w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>In the <strong>Numeric value<\/strong> field, enter <strong>755<\/strong> for directories. This lets the owner read, write, and execute the file but prevents others from modifying it.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c7e12\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"534\" height=\"421\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/ftp-fileattributes-755.png\" alt=\"FileZilla FTP highlights the numeric value field in the Change file attributes popup, giving the directory file permissions 755\" class=\"wp-image-100200\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-755.png 534w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-755-300x237.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-755-150x118.png 150w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Select <strong>Apply to directories only<\/strong>, then hit <strong>OK<\/strong>.<\/li>\n\n\n\n<li>For files, repeat the process, entering <strong>644<\/strong> for the <strong>Numeric value<\/strong> and selecting <strong>Apply to files only<\/strong>. This gives the owner read and write access, while others can only read.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9c8631\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"534\" height=\"421\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/12\/ftp-fileattributes-644.png\" alt=\"FileZilla FTP highlights the numeric value field in the Change file attributes popup, giving the directory file permissions 644\" class=\"wp-image-100201\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-644.png 534w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-644-300x237.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/12\/ftp-fileattributes-644-150x118.png 150w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Once you&rsquo;ve applied the correct permissions, revisit your site to confirm if the 403 error disappears.<\/p><h2 class=\"wp-block-heading\" id=\"h-8-edit-file-ownership\">8. Edit File Ownership<\/h2><p>In Linux and VPS hosting environments, the ownership settings decide which users can modify or execute files. If ownership is incorrectly assigned, you may be denied access to certain resources, causing a 403 error.<\/p><p>This fix is more technical, as it requires using SSH to connect to your server and running Linux commands. Follow these steps to check and <a href=\"\/ph\/tutorials\/how-to-change-linux-permissions-and-owners\">adjust file ownership in Linux<\/a>:<\/p><ol class=\"wp-block-list\">\n<li>Connect to your server using an <a href=\"\/ph\/tutorials\/how-to-use-putty-ssh\">SSH client like PuTTY<\/a>.<\/li>\n\n\n\n<li>To check the ownership of a file, run:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls -l [file name]<\/pre><p>The output will look like this:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-rwxrw-rw- 1 [owner][group] 22 Sep 22 10:00 filename.txt<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Owner<\/strong> and <strong>group<\/strong> should match your hosting account&rsquo;s username. If not, use the <strong>chown<\/strong> command to fix it:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">chown [owner][:group] [file name]<\/pre><p>For example, if your username is <strong>John<\/strong>, use:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">chown John filename.txt<\/pre><h2 class=\"wp-block-heading\" id=\"h-9-upload-an-index-page\">9. Upload an index page<\/h2><p>If your website lacks an index page, such as <strong>index.html<\/strong> or<strong> index.php<\/strong>, users may receive a 403 Forbidden error when trying to access it.<\/p><p>This occurs because the web server expects an index page to load by default, and without one, the server blocks access.<\/p><p>First, check if your homepage is named <strong>index.html<\/strong> or<strong> index.php<\/strong>. If not, rename it through your FTP client or file manager.<\/p><p>If the index page is missing, create one. Here&rsquo;s how:<\/p><ol class=\"wp-block-list\">\n<li>Access your website&rsquo;s directory.<\/li>\n\n\n\n<li>Upload or create an <strong>index.html<\/strong> or <strong>index.php<\/strong> file inside the <strong>public_html<\/strong> directory.<\/li>\n\n\n\n<li>After uploading, try visiting your website again to verify that it now loads the homepage correctly.<\/li>\n<\/ol><p>If you&rsquo;re still facing issues, we have two more troubleshooting steps involving domain-related configurations that you can try.<\/p><h2 class=\"wp-block-heading\" id=\"h-10-verify-the-a-record\">10. Verify the A record<\/h2><p>The A record is a type of <a href=\"\/ph\/tutorials\/what-is-dns\">Domain Name System (DNS)<\/a> record that maps your domain to the correct IP address. If your domain&rsquo;s A record points to the wrong IP, users may be denied access to your website. This leads to a 403 Forbidden response.<\/p><p>If you host your website with Hostinger, first find your site&rsquo;s IP address by going to <strong>hPanel &rarr; Hosting Plan &rarr; Plan Details<\/strong>.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9ca13c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-websites-hosting-plan-details-ip-address-highlighted.png\" alt=\"The website's IP address information in hPanel\" class=\"wp-image-132430\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Then, <a href=\"\/ph\/tutorials\/how-to-check-if-domain-a-record-is-pointed-correctly\">check if your domain&rsquo;s A record is pointed correctly<\/a> by following these steps:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>Advanced &rarr; DNS Zone Editor<\/strong>.<\/li>\n\n\n\n<li>Locate the A records by scanning the <strong>Type<\/strong> column.<\/li>\n\n\n\n<li>Examine the IP addresses listed in the <strong>Content<\/strong> column.<\/li>\n\n\n\n<li>If the A record doesn&rsquo;t point to the correct IP address, click <strong>Edit<\/strong> to modify it, then click <strong>Update<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9cb4ce\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-domain-portfolio-dns-nameservers-a-highlighted.png\" alt=\"An A record in hPanel\" class=\"wp-image-132431\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Please note that editing the A record may affect the services or subdomains using it.<\/p><p>If this doesn&rsquo;t resolve the error or causes disruptions, consider creating a new A record instead:<\/p><ol class=\"wp-block-list\">\n<li>In the same <strong>DNS \/ Nameserver<\/strong> page, scroll up to the <strong>Manage DNS records<\/strong> section.<\/li>\n\n\n\n<li>Select <strong>A<\/strong> for the <strong>Type<\/strong>, then enter the correct IP address in the <strong>Points to<\/strong> field.<\/li>\n\n\n\n<li>Click <strong>Add Record<\/strong> to create the new A record.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9cca50\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-domain-portfolio-dns-nameservers-manage-dns-records-1024x182.png\" alt=\"The Manage DNS records section in hPanel\" class=\"wp-image-132434\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-11-update-nameservers\">11. Update nameservers<\/h2><p>When you change hosting providers, your domain&rsquo;s DNS records need to be updated to point to the correct nameservers. If you skip this step, users will still be directed to your old host, which leads to access issues like the 403 Forbidden error.<\/p><p>If you register your domain at Hostinger, here&rsquo;s how to <a href=\"\/ph\/tutorials\/how-to-change-domain-nameservers\">update your domain&rsquo;s nameservers<\/a>:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>Domains &rarr; Domain portfolio &rarr; Manage<\/strong> next to your domain.<\/li>\n\n\n\n<li>Select <strong>DNS \/ Nameservers &rarr; DNS records<\/strong>.<\/li>\n\n\n\n<li>Choose <strong>Use Hostinger nameservers (recommended)<\/strong> if your website is with Hostinger, or <strong>Change nameservers<\/strong> if you host your site elsewhere.<\/li>\n\n\n\n<li>Fill in the correct nameserver details, then hit <strong>Save<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e222a9ce11f\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/08\/hpanel-domain-portfolio-dns-nameservers-dns-records-selected.png\" alt=\"The Select Nameservers options in hPanel\" class=\"wp-image-132433\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-learn-how-to-fix-the-403-forbidden-error-with-hostinger-academy\">Learn how to fix the 403 Forbidden error with Hostinger Academy<\/h3><p>If you prefer a visual guide, watch our video to discover easy-to-follow solutions for fixing the 403 Forbidden error. We&rsquo;ll show you step-by-step instructions on how to apply key troubleshooting methods, like adjusting file permissions and resolving issues with the <strong>.htaccess<\/strong> file.<\/p><figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"How to Fix 403 Forbidden Error\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/wWtYqgOBe3Q?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure><p>\n  <div class=\"youtube-shortcode\">\n    <div class=\"row\">\n      <div class=\"col-7 col-sm-8 d-flex align-items-center\">\n        <img decoding=\"async\" class=\"channel-logo\" src=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/themes\/tutorialsthemeuplift\/public\/images\/youtube-channels\/hostinger-academy.jpg\" alt=\"youtube channel logo\">\n        <div class=\"d-flex flex-column justify-content-between\">\n          <span class=\"slogan d-none d-sm-block\">Subscribe For more educational videos!<\/span>\n          <span class=\"channel-name\">Hostinger Academy<\/span>\n                    <\/div>\n      <\/div>\n      <div class=\"col-5 col-sm-4 d-flex align-items-center justify-content-end\">\n          <a class=\"subscribe-button\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" href=\"http:\/\/www.youtube.com\/channel\/UCbNIC-svDbtUOH2qsLnPQPg?sub_confirmation=1\">\n            <img decoding=\"async\" src=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/themes\/tutorialsthemeuplift\/public\/images\/icons\/youtube.svg\" alt=\"subscribe\">\n            <span>Subscribe<\/span>\n          <\/a>\n      <\/div>\n    <\/div>\n  <\/div>\n\n    \n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-key-takeaways\">Key takeaways<\/h2><p>Troubleshooting the 403 Forbidden error requires a systematic approach. Start with the simplest fixes and gradually progress to more complex solutions.<\/p><ul class=\"wp-block-list\">\n<li><strong>Clear your browser cache and cookies and switch off your VPN connection<\/strong> to rule out local issues like outdated data or restricted access.<\/li>\n\n\n\n<li><strong>Perform malware scans and update plugins<\/strong> to avoid conflicts and ensure that your site is secure.<\/li>\n\n\n\n<li><strong>Reset file permissions and restore your .htaccess file<\/strong> to correct server-side issues that may be blocking access.<\/li>\n\n\n\n<li><strong>Verify your domain&rsquo;s A record and nameservers<\/strong> to ensure that your domain points to the correct IP address and has the right configuration for server communication.<\/li>\n<\/ul><p>If the 403 problem persists, there are still some other methods worth trying:<\/p><ul class=\"wp-block-list\">\n<li><strong>Check for issues with hidden files or directories<\/strong> that might be causing the error.<\/li>\n\n\n\n<li><strong>Inspect the server error logs<\/strong> for detailed information about what might be causing the 403 error.<\/li>\n\n\n\n<li><strong>Contact your hosting provider&rsquo;s support team<\/strong> to help you diagnose and fix the error.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A 403 Forbidden error is an HTTP status code that blocks access due to permission or configuration issues. This error indicates that the server understands the request but refuses to authorize it, typically because of restricted permissions. Keep reading as we walk you through actionable solutions to fix the 403 Forbidden error, from simple troubleshooting [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ph\/tutorials\/how-to-solve-403-forbidden-error\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"","rank_math_description":"","rank_math_focus_keyword":"","footnotes":""},"categories":[22623,22625],"tags":[],"class_list":["post-125372","post","type-post","status-publish","format-standard","hentry","category-hosting","category-technical-aspects"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/o-que-significa-erro-403","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/tutorialo-que-significa-erro-403","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-solve-403-forbidden-error","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-solve-403-forbidden-error","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/125372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/comments?post=125372"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/125372\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/media?parent=125372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/categories?post=125372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/tags?post=125372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}