{"id":39882,"date":"2026-07-26T15:38:54","date_gmt":"2026-07-26T22:38:54","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=39882"},"modified":"2026-07-26T15:53:56","modified_gmt":"2026-07-26T22:53:56","slug":"401-unauthorized-error","status":"publish","type":"post","link":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/","title":{"rendered":"401 Unauthorized Error: What It Is &#038; How to Fix It"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">401 Unauthorized is the internet equivalent of a \u201cRestricted Entry\u201d sign at a posh nightclub. Sure, it may help you keep away some unsavory visitors. But it can also turn away legitimate customers while making you look like a snob.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Worse still, 401 errors are often caused by reasons that have nothing to do with the visitor, making them extra frustrating to encounter. But not to worry! Here are a few simple steps you can take as a website owner to troubleshoot the 401 error before it starts impacting your website\u2019s trust.<\/p>\n\n\n\n<h2 id=\"h-what-is-the-401-unauthorized-error\" class=\"wp-block-heading\">What is the 401 Unauthorized Error?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP 401 Unauthorized is a status code meaning a request failed because it lacks valid authentication credentials for the requested resource. The server sends it with a WWW-Authenticate response header that names the authentication scheme it expects. To fix it, re-enter your credentials, clear stale cookies, or check the server\u2019s authentication configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What that actually means: 401 Unauthorized is an authentication error, which means the page you are trying to visit is password-protected and your browser hasn\u2019t supplied valid login credentials. This can happen when the user enters a wrong password or when the browser fails to send valid credentials at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, 401 errors can also be false positives, meaning that the error can occur even when the visitor has the right credentials to log into a website. It may even occur when the web page isn\u2019t supposed to be password-protected at all. For example, it can be caused by a jittery firewall, a troublesome plugin, or an uncooperative extension added to your website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You may notice the 401 error as one of these messages popping up in your browser window:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>401 Authorization Required<\/li>\n\n\n\n<li>401 Unauthorized<\/li>\n\n\n\n<li>HTTP 401 Error \u2013 Unauthorized<\/li>\n\n\n\n<li>Access Denied<\/li>\n\n\n\n<li>HTTP Error 401<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"1000\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error.png.webp\" alt=\"Example of 401 Unauthorized Error page\" class=\"wp-image-39886 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error.png.webp 1600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/What-is-the-401-error-300x188.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/What-is-the-401-error-1024x640.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/What-is-the-401-error-768x480.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/What-is-the-401-error-1536x960.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-600x375.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-1200x750.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-730x456.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-1460x913.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-784x490.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-1568x980.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/What-is-the-401-error-877x548.png.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1000;\" \/><\/figure>\n\n\n\n<h2 id=\"h-401-vs-403-vs-407-which-error-do-you-actually-have\" class=\"wp-block-heading\">401 vs. 403 vs. 407: which error do you actually have?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before troubleshooting, confirm you\u2019re looking at a real 401 and not one of its neighbors. The short version: a 401 means the server doesn\u2019t know who you are, while a 403 means it knows exactly who you are, and the answer is still no. Per <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Status\/403\" target=\"_blank\" rel=\"noopener\">MDN\u2019s 403 reference<\/a>, \u201cauthenticating or re-authenticating makes no difference\u201d for a 403.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Status code<\/th><th>What it means<\/th><th>Will logging in fix it?<\/th><\/tr><\/thead><tbody><tr><td>401 Unauthorized<\/td><td>The request lacks valid authentication credentials \u2014 missing, expired, or wrong.<\/td><td>Yes. Retry with valid credentials.<\/td><\/tr><tr><td>403 Forbidden<\/td><td>The server understood the request but refused it, usually because your account lacks permission.<\/td><td>No. You need permissions changed, not another login.<\/td><\/tr><tr><td>407 Proxy Authentication Required<\/td><td>A proxy between you and the site (common on corporate networks) wants credentials \u2014 the website itself isn\u2019t asking.<\/td><td>Yes, but authenticate with the proxy via its Proxy-Authenticate challenge.<\/td><\/tr><tr><td>400 Bad Request<\/td><td>The request itself is malformed, so the server won\u2019t process it.<\/td><td>No. The request has to change before the server will accept it.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One trap worth naming: if you\u2019re behind a corporate proxy or VPN, an authentication prompt may be a 407 from the proxy, not a 401 from the website. Check the status code in your browser\u2019s developer tools before blaming the site.<\/p>\n\n\n\n<h2 id=\"h-what-causes-a-401-unauthorized-error\" class=\"wp-block-heading\">What causes a 401 unauthorized error?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">401 errors occur when a web browser has trouble authenticating the visitor\u2019s login credentials with the website\u2019s server. Here are a few common reasons why that might happen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Error or typo in the website\u2019s URL.<\/li>\n\n\n\n<li>Outdated cookies or browser cache.<\/li>\n\n\n\n<li>IP address restrictions on site access.<\/li>\n\n\n\n<li>Errors in server configuration.<\/li>\n\n\n\n<li>Incompatible plugin or website theme.<\/li>\n\n\n\n<li>Incorrect login attempts by the user.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">401 errors are normally client-side errors, meaning they can often be fixed by clearing your browser\u2019s cookies or inputting the correct password. However, server-side issues like <a href=\"https:\/\/www.dreamhost.com\/blog\/secure-your-wordpress-website\/\" target=\"_blank\" rel=\"noopener\">plugins and firewalls<\/a> can also cause these errors, making it very important for site admins to be aware of potential conflicts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But these are all surface-level explanations. If you want to know what causes a 401 error, you must understand how authentication works in web development.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a client (i.e., a web browser) requests access to a protected resource on a website, the website will need the client to provide some form of valid authentication. These credentials could be in the form of API keys, a username and password, digital certificates, or something else, depending on the authentication scheme used by the site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The website then processes the authentication credentials to verify their validity. This could involve checking the credentials against a stored database of users and passwords, contacting an external authentication provider, or performing some other form of validation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the authentication is successful, it returns a 200 status code, and the website will generate a session token for the client. This identifies the authenticated client and tracks the client\u2019s interactions within the website. The session token is often stored in a cookie in the client\u2019s browser or as a header in any subsequent requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if the authentication is unsuccessful, the website will return an HTTP error message, such as the 401 error code. The 401 error message typically includes a WWW-Authenticate header, which explains how to authenticate with the server in the user\u2019s browser. This header can include more context about the 401 error, such as the type of authentication required (e.g., Basic, Digest, or OAuth).<\/p>\n\n\n\n<h2 id=\"h-how-to-fix-the-401-unauthorized-error\" class=\"wp-block-heading\">How to fix the 401 unauthorized error<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">401 access control errors are pretty common when logging into a membership site or accessing a protected web page. Luckily, they are also very easy to fix most of the time. Here are a few things you can do to address this error, both as a website visitor and a web administrator:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-client-side-solutions\">Client-side solutions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">401 error pages are sometimes caused by client-side issues like login credentials or even the web browser used to access your website\u2019s password protection system. These can be fixed with a few simple steps from the visitor\u2019s end:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check User Credentials: Make sure you entered the correct username and password combination. Double-check your authentication credentials for the slightest typo. Remember, usernames and passwords are case-sensitive.<\/li>\n\n\n\n<li>Clear Browser Cookies: If the website uses cookies for authentication, the error may be because of invalid or expired cookies. Normally, cookies have an expiration date or just expire when the browser is closed. If you\u2019re having trouble accessing a website, clear browsing data by following the instructions for your specific web browser to help solve the issue.<\/li>\n<\/ul>\n\n\n\n\n\n<div class=\"glossary-term\">\n\t<a\n\t\tclass=\"glossary-term__above-title\"\n\t\thref=\"\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noopener noreferrer\"\n\t>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 512\"><path d=\"M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z\"\/><\/svg>\n\t\t<span><\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n    <h3>Cookies<\/h3>\n    <p>Cookies are pieces of data sent to a user\u2019s computer or mobile device by a web server. They are then stored on the user\u2019s device. Cookies can be used for authentication, identification of a user session, personalization of web content, or collecting information about the use of a website.<\/p>\n            <a\n            href=\"https:\/\/www.dreamhost.com\/glossary\/hosting\/cookies\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Read More                    <\/a>\n\n<\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify URL: Make sure the URL you\u2019re trying to access is correct and up to date. A mistyped URL usually returns a 404, but a URL that points into a password-protected area of a site can return a 401. If you\u2019re following a link from another website, it\u2019s quite possible that the link is using the wrong URL.<\/li>\n\n\n\n<li>Too Many Attempts: Some sites temporarily lock logins after repeated failed attempts, so wait a few minutes before retrying. True rate limiting has its own status code, though \u2014 per <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Status\/429\" target=\"_blank\" rel=\"noopener\">MDN<\/a>, servers signal it with a 429 Too Many Requests response, not a 401.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1250\" height=\"682\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows.png.webp\" alt=\"Flush your DNS on Windows 10\/11\" class=\"wp-image-39887 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows.png.webp 1250w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/DNS-flushing-on-Windows-300x164.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/DNS-flushing-on-Windows-1024x559.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/DNS-flushing-on-Windows-768x419.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows-600x327.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows-1200x655.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows-730x398.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows-784x428.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Windows-877x478.png.webp 877w\" data-sizes=\"(max-width: 1250px) 100vw, 1250px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1250px; --smush-placeholder-aspect-ratio: 1250\/682;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1244\" height=\"239\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383.png.webp\" alt=\"Flush your DNS cache on Mac using Terminal\" class=\"wp-image-39888 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383.png.webp 1244w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-300x58.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-1024x197.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-768x148.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-600x115.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-1200x231.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-730x140.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-784x151.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/DNS-flushing-on-Mac-e1685463414383-877x168.png.webp 877w\" data-sizes=\"(max-width: 1244px) 100vw, 1244px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1244px; --smush-placeholder-aspect-ratio: 1244\/239;\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-dns-flushing\">DNS flushing<\/h4>\n\n\n\n\n\n<div class=\"glossary-term\">\n\t<a\n\t\tclass=\"glossary-term__above-title\"\n\t\thref=\"\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noopener noreferrer\"\n\t>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 512\"><path d=\"M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z\"\/><\/svg>\n\t\t<span><\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n    <h3>What is DNS?<\/h3>\n    <p>The Domain Name System (DNS) protocol keeps records of which domain names correspond to specific IP addresses. This system enables you to browse the web by typing in regular URLs instead of IP addresses.<\/p>\n            <a\n            href=\"https:\/\/www.dreamhost.com\/glossary\/domains\/dns\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Read More                    <\/a>\n\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">DNS caches help improve loading speed and website performance when browsing the internet, but stale or outdated entries can send your browser to the wrong (or an old) server, which can respond with unexpected errors. Flushing (clearing) your DNS cache is a quick, harmless way to rule this out, and it can be done a few different ways:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><b>Windows:<\/b> To flush your DNS on Windows 10\/11, follow these steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the Command Prompt by pressing Windows+R and typing \u201ccmd\u201d (without quotes) into the Run dialog box.<\/li>\n\n\n\n<li>Now type in the command \u201cipconfig\/flushdns\u201d inside Command Prompt.<\/li>\n\n\n\n<li>If you are a Windows PowerShell user, you can do this by opening PowerShell and typing in \u201cClear-DnsClientCache\u201d (without quotes).<\/li>\n\n\n\n<li>This will flush the DNS and clear all the records from the local DNS cache.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><b>macOS:<\/b> If you\u2019re using a MacBook or iMac, you can flush your DNS cache using Terminal.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open Terminal on your Mac by using Spotlight Search or pressing Command+Space and typing Terminal into the search box.<\/li>\n\n\n\n<li>Inside Terminal, type in \u201csudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder\u201d (without quotes).<\/li>\n\n\n\n<li>Your DNS cache has now been flushed on your Apple computer.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><b>Google Chrome:<\/b> If you\u2019re using Google Chrome, the browser has its own DNS cache that\u2019s independent of the operating system (Windows or Mac). To clear Chrome\u2019s DNS cache:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Type \u201cchrome:\/\/net-internals\/#dns\u201d into the address bar.<\/li>\n\n\n\n<li>Now, click on the \u201cClear host cache\u201d button to clear your DNS records.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1774\" height=\"887\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image.png.webp\" alt=\"Ways to fix the 401 error. On the client side, check credentials, clear cookies, confirm the URL, wait after failed login attempts, and flush DNS. On the server side, diagnose plugins, examine the WWW-Authenticate header, check API tokens, and check the .htaccess file.\" class=\"wp-image-86459 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image.png.webp 1774w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-300x150.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-1024x512.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-768x384.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-1536x768.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-600x300.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-1200x600.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-730x365.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-1460x730.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-784x392.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-1568x784.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-877x439.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2026\/07\/401-error-client-server-side-fixes-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-update-1-image-1754x877.png.webp 1754w\" data-sizes=\"(max-width: 1774px) 100vw, 1774px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1774px; --smush-placeholder-aspect-ratio: 1774\/887;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-server-side-solutions\">Server-side solutions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the visitor\u2019s credentials and browser check out, the problem lives on your server. Work through these checks in order.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-wordpress-plugins\">Fixing a 401 error caused by WordPress plugins<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.dreamhost.com\/blog\/best-wordpress-plugins\/\" target=\"_blank\" rel=\"noopener\">Plugins are a staple for WordPress websites<\/a>, but they can sometimes also <a href=\"https:\/\/www.dreamhost.com\/blog\/common-wordpress-errors\/\" target=\"_blank\" rel=\"noopener\">cause errors<\/a> if configured improperly. This can happen when the plugin contains code that creates a website security issue or conflicts with the platform\u2019s core functionality.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, what can a site admin do to fix this issue? Well, the first step is to identify which plugin or plugins are causing the issue. Usually, this can be done by disabling each plugin one by one and checking if the error still appears. Once the plugin causing the issue is identified, you can either update, reconfigure, or permanently remove it. Common culprits may include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CDN services like Cloudflare and KeyCDN.<\/li>\n\n\n\n<li>Web firewalls like Sucuri and Wordfence.<\/li>\n\n\n\n<li>Poorly built WordPress themes.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Follow these simple steps to enable or disable plugins on your WordPress site:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, log in to your WordPress dashboard.<\/li>\n\n\n\n<li>Click on the \u201cPlugins\u201d option in the left-hand menu.<\/li>\n\n\n\n<li>Find the plugin you want to enable or disable and click on the \u201cActivate\u201d or \u201cDeactivate\u201d button below the plugin name.<\/li>\n\n\n\n<li>If you want to disable multiple plugins at once, check the box next to each plugin and select \u201cDeactivate\u201d from the \u201cBulk Actions\u201d drop-down menu.<\/li>\n\n\n\n<li>If you want to enable multiple plugins at once, check the box next to each plugin and select \u201cActivate\u201d from the \u201cBulk Actions\u201d drop-down menu.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In some cases, it is also possible to fix the issue by disabling or reconfiguring specific settings within a plugin. For example, if your website uses a caching plugin, it\u2019s worth trying to clear the cache and check if the error still appears.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-www-authenticate-header\">WWW-Authenticate header<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In a few rare cases, 401 errors can result from a server error. You can find out more about this by looking at your WWW-Authenticate Header.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The WWW-Authenticate Header is a response header sent by the server that contains information on the authentication methods supported by the site. This header helps the user\u2019s browser decide which authentication protocol to use when requesting data from the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The header is also used to send additional information about the authentication process. This may include the domain being protected by the authentication scheme, or the algorithm used by the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s what the exchange looks like on the wire, using the example from <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Status\/401\" target=\"_blank\" rel=\"noopener\">MDN\u2019s 401 reference<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GET \/admin HTTP\/1.1\nHost: example.com\n\nHTTP\/1.1 401 Unauthorized\nDate: Tue, 02 Jul 2024 12:18:47 GMT\nWWW-Authenticate: Bearer<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reading it line by line: the client asks for \/admin without sending any credentials. The server answers 401 and uses WWW-Authenticate: Bearer to say \u201cthis resource needs a bearer token.\u201d Resend the request with a valid Authorization header, and the 401 goes away.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To check the WWW-Authenticate Header, open Chrome, navigate to the URL causing the 401 error, and right-click anywhere on the page. From the drop-down menu, select \u201cInspect\u201d. This will bring up the Developer Tools window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Select the Network tab once inside the Developer Tools window. Here, you\u2019ll see all the requests the browser sends when loading the page. If the response from the server contains a WWW-Authenticate header, it will be visible in this tab.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By inspecting the WWW-Authenticate header, you can get a better understanding of the authentication process used by the server. Next, check that the response was sent and identify what authentication scheme was used to send it. That\u2019ll help you narrow down the problem before looking for a specific solution. Here are a few authentication schemes found in the WWW-Authenticate Header, along with descriptions of how they work, for reference:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basic: This scheme uses a base64-encoded username and password separated by a colon. This is considered the least secure authentication method and should only be used over HTTPS.<\/li>\n\n\n\n<li>Digest: This scheme uses a challenge-response protocol to authenticate clients. The server sends a nonce value to the client, which the client uses to create a response based on the username, password, and request information.<\/li>\n\n\n\n<li>Bearer: This scheme is used for OAuth 2.0 authentication. The client receives a token from the server, which it uses to authenticate subsequent requests.<\/li>\n\n\n\n<li>Negotiate: This scheme is used for Kerberos authentication.<\/li>\n\n\n\n<li>AWS4-HMAC-SHA256: This authentication scheme is used to authenticate requests to Amazon Web Services (AWS) using an AWS access key and a secret access key.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1704\" height=\"980\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header.png.webp\" alt=\"401 errors can result from a server error. You can find out more about this by looking at your WWW-Authenticate Header. The WWW-Authenticate Header is a response header sent by the server that contains information on the authentication methods supported by the site.\" class=\"wp-image-39892 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header.png.webp 1704w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/WWW-Authenticate-Header-300x173.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/WWW-Authenticate-Header-1024x589.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/WWW-Authenticate-Header-768x442.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/WWW-Authenticate-Header-1536x883.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-600x345.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-1200x690.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-730x420.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-1460x840.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-784x451.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-1568x902.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/03\/WWW-Authenticate-Header-877x504.png.webp 877w\" data-sizes=\"(max-width: 1704px) 100vw, 1704px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1704px; --smush-placeholder-aspect-ratio: 1704\/980;\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-api-token-401\">Fixing a 401 error from an API or token<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Getting the 401 from an API rather than a web page? Suspect the token first. Three checks solve most cases:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check expiry and revocation: OAuth 2.0 access tokens expire, and under <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc6750\" target=\"_blank\" rel=\"noopener\">RFC 6750<\/a> an expired or revoked bearer token is rejected with a 401 and an \u201cinvalid_token\u201d error code. Refresh the token or request a new one, then retry.<\/li>\n\n\n\n<li>Verify the Authorization header: credentials must be sent in the format the scheme expects (for Bearer auth, that\u2019s \u201cAuthorization: Bearer &lt;token&gt;\u201d). A missing scheme name or stray whitespace is enough to earn a 401.<\/li>\n\n\n\n<li>Match the scheme: compare your request against the WWW-Authenticate challenge in the 401 response. It names the scheme (and often the realm) the server actually accepts.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-htaccess-file\">.htaccess file<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re experiencing a 401 error on your website, one possible cause could be an issue with your <a href=\"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-and-htaccess\/\" target=\"_blank\" rel=\"noopener\">.htaccess file<\/a>. The .htaccess file is a configuration file used by Apache web servers to control access to your website\u2019s directories and files. Here\u2019s how to check your .htaccess file for causes of a 401 error:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connect to your website\u2019s server using an FTP client or file manager.<\/li>\n\n\n\n<li>Navigate to the directory where your .htaccess file is located. This is usually the root directory of your website.<\/li>\n\n\n\n<li>Download a copy of your .htaccess file to your computer.<\/li>\n\n\n\n<li>Open the .htaccess file in a text editor (like Notepad++) and look for any lines that specify access controls or authentication requirements. Specifically, you\u2019ll want to look for the following parameters: AuthUserFile, AuthName, AuthType, and Require.<\/li>\n\n\n\n<li>Check that the access controls or authentication requirements specified in the .htaccess file match the settings you intend to use for your website. For example, if you have recently updated your website\u2019s authentication mechanism (AuthType), you may need to update the corresponding settings in your .htaccess file as well.<\/li>\n\n\n\n<li>Save the changes to your .htaccess file and upload it back to your website\u2019s server.<\/li>\n\n\n\n<li>Test your website to see if the 401 error has been resolved.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"h-what-a-lingering-401-does-to-your-seo\" class=\"wp-block-heading\">What a lingering 401 does to your SEO<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s the part that makes speed matter: search engine crawlers don\u2019t have your password. If pages that should be public start returning 401 (due to a firewall misfire or staging password protection left switched on), Googlebot gets the same locked door your visitors do. Google only indexes a page after it can crawl and process its content, per <a href=\"https:\/\/support.google.com\/webmasters\/answer\/7440203?hl=en\" target=\"_blank\" rel=\"noopener\">Google\u2019s Page indexing report documentation<\/a>, so a page serving 401s can\u2019t stay eligible for search results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You do get a grace period. Google notes that when a URL is unavailable, it \u201cwill probably continue to try crawling that URL for a while.\u201d Use that window: open the Page indexing report in Search Console, which flags the indexing problems Google hit while crawling your site, and fix any unintended 401 before the retries stop.<\/p>\n\n\n\n<h2 id=\"h-if-you-re-still-having-trouble-it-s-time-to-contact-an-expert\" class=\"wp-block-heading\">If You\u2019re Still Having Trouble, It\u2019s Time to Contact an Expert<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HTTP response codes offer little context on their own, which makes them troublesome to navigate without the proper technical assistance. It\u2019s part of the reason why DreamHost offers 24\/7 support to help you troubleshoot downtime on your website and domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re having trouble diagnosing or fixing a 401 error on your website, you can try contacting your hosting provider for support. It\u2019s also possible to <a href=\"https:\/\/www.dreamhost.com\/pro-services\/\" target=\"_blank\" rel=\"noopener\">contract a technical expert<\/a>, such as a <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-hire-web-developer\/\" target=\"_blank\" rel=\"noopener\">web developer<\/a>, for help with the issue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">401 errors can be jarring for the end user, but they are often an easy fix. If you\u2019re contacted by someone unable to access your website due to this error, walk them through the common client-side solutions before looking into any potential server issues, such as WordPress plugins or the WWW-Authenticate header. If you\u2019re still having trouble, you can always bring in some technical help to diagnose the issue.<\/p>\n\n\n\n<h2 id=\"h-faqs-about-the-401-unauthorized-error\" class=\"wp-block-heading\">FAQs about the 401 unauthorized error<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faq-invalid-credentials\">What does \u201c401 \u2013 Unauthorized: access is denied due to invalid credentials\u201d mean?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s a long-form version of the standard 401 error: the server rejected the request because it lacked valid authentication credentials. Double-check your username and password, clear the site\u2019s cookies, and try again. The message doesn\u2019t mean your account was banned.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faq-401-vs-403\">Is a 401 error the same as a 403 Forbidden error?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. A 401 means you aren\u2019t authenticated: credentials are missing or invalid, so logging in correctly can fix it. A 403 means the server knows who you are and still refuses. Per MDN, re-authenticating makes no difference for a 403.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faq-authorization-required\">What does 401 Authorization Required mean?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s another label some servers use for the same HTTP 401 status: the page is protected, and the server needs valid credentials before it will respond. The fixes are identical: verify the URL, re-enter your credentials, and clear cookies for the site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faq-visitor-fault\">Is a 401 error my fault as the visitor?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not always. Wrong passwords and expired cookies are visitor-side causes, but misconfigured plugins, firewalls, and .htaccess rules on the server can return a 401 even when your credentials are correct. If other people report the same error, the problem is almost certainly server-side.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faq-seo\">Do 401 errors hurt SEO?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">They can. Search engine crawlers can\u2019t log in, so a public page that returns 401 can\u2019t be crawled or indexed. Unintended 401s surface in Google Search Console\u2019s Page indexing report \u2014 fix them quickly to keep affected pages eligible for search results.<\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>","protected":false},"excerpt":{"rendered":"<p>401 Unauthorized is the internet equivalent of a \u201cRestricted Entry\u201d sign at a posh nightclub. Sure, it may help you keep away some unsavory visitors. But it can also turn away legitimate customers while making you look like a snob. Worse still, 401 errors are often caused by reasons that have nothing to do with [&hellip;]<\/p>\n","protected":false},"author":1062,"featured_media":86458,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_opengraph-title":"HTTP 401 Unauthorized Error: How to Fix It - DreamHost","_yoast_wpseo_opengraph-description":"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.","_yoast_wpseo_twitter-title":"HTTP 401 Unauthorized Error: How to Fix It - DreamHost","_yoast_wpseo_twitter-description":"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.","toc_headlines":"[[\"h-what-is-the-401-unauthorized-error\",\"What is the 401 Unauthorized Error?\"],[\"h-401-vs-403-vs-407-which-error-do-you-actually-have\",\"401 vs. 403 vs. 407: which error do you actually have?\"],[\"h-what-causes-a-401-unauthorized-error\",\"What causes a 401 unauthorized error?\"],[\"h-how-to-fix-the-401-unauthorized-error\",\"How to fix the 401 unauthorized error\"],[\"h-what-a-lingering-401-does-to-your-seo\",\"What a lingering 401 does to your SEO\"],[\"h-if-you-re-still-having-trouble-it-s-time-to-contact-an-expert\",\"If You\u2019re Still Having Trouble, It\u2019s Time to Contact an Expert\"],[\"h-faqs-about-the-401-unauthorized-error\",\"FAQs about the 401 unauthorized error\"]]","hide_toc":false,"show_updated_at":"1","footnotes":""},"categories":[13127,550,696],"tags":[],"class_list":["post-39882","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-errors-troubleshooting","category-tutorials","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v28.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>HTTP 401 Unauthorized Error: How to Fix It - DreamHost<\/title>\n<meta name=\"description\" content=\"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTTP 401 Unauthorized Error: How to Fix It - DreamHost\" \/>\n<meta property=\"og:description\" content=\"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-26T22:38:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-26T22:53:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/401-Unauthorized-Error-social-image.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jason Cosper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"HTTP 401 Unauthorized Error: How to Fix It - DreamHost\" \/>\n<meta name=\"twitter:description\" content=\"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jason Cosper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"HTTP 401 Unauthorized Error: How to Fix It - DreamHost","description":"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/","og_locale":"en_US","og_type":"article","og_title":"HTTP 401 Unauthorized Error: How to Fix It - DreamHost","og_description":"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.","og_url":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2026-07-26T22:38:54+00:00","article_modified_time":"2026-07-26T22:53:56+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/03\/401-Unauthorized-Error-social-image.jpg","type":"image\/jpeg"}],"author":"Jason Cosper","twitter_card":"summary_large_image","twitter_title":"HTTP 401 Unauthorized Error: How to Fix It - DreamHost","twitter_description":"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Jason Cosper","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#article","isPartOf":{"@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/"},"author":{"name":"Jason Cosper","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/person\/2273b8bf7336df78f6d99a89c17253c4"},"headline":"401 Unauthorized Error: What It Is &#038; How to Fix It","datePublished":"2026-07-26T22:38:54+00:00","dateModified":"2026-07-26T22:53:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/"},"wordCount":2998,"publisher":{"@id":"https:\/\/www.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/blog-hero-401-unauthorized-error-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-hero-image.png","articleSection":["Errors &amp; Troubleshooting","Tutorials","WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/","url":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/","name":"HTTP 401 Unauthorized Error: How to Fix It - DreamHost","isPartOf":{"@id":"https:\/\/www.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#primaryimage"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/blog-hero-401-unauthorized-error-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-hero-image.png","datePublished":"2026-07-26T22:38:54+00:00","dateModified":"2026-07-26T22:53:56+00:00","description":"HTTP 401 Unauthorized means the request lacks valid credentials. Learn what causes this error and the exact steps to fix it, from DreamHost.","breadcrumb":{"@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#primaryimage","url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/blog-hero-401-unauthorized-error-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-hero-image.png","contentUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/07\/blog-hero-401-unauthorized-error-dreamops-7d5ec067675b482fbe9754e99fe820d4-p3-imageaudit-hero-image.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.dreamhost.com\/blog\/401-unauthorized-error\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dreamhost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"401 Unauthorized Error: What It Is &#038; How to Fix It"}]},{"@type":"WebSite","@id":"https:\/\/www.dreamhost.com\/blog\/#website","url":"https:\/\/www.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/person\/2273b8bf7336df78f6d99a89c17253c4","name":"Jason Cosper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","contentUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","caption":"Jason Cosper"},"description":"Jason is DreamHost\u2019s WordPress Product Advocate, based out of Bakersfield, CA. He is currently working on making our DreamPress product even better. In his free time, he likes to curl up on the couch and watch scary movies with his wife Sarah and three very small dogs. Follow him on Twitter.","url":"https:\/\/www.dreamhost.com\/blog\/author\/jasoncosper\/"}]}},"lang":"en","translations":{"en":39882,"es":39897,"de":52756,"uk":52763,"pl":54823,"pt":54853,"ru":54901,"it":68354,"fr":70303,"nl":70329},"pll_sync_post":{},"_links":{"self":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/39882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1062"}],"version-history":[{"count":1,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/39882\/revisions"}],"predecessor-version":[{"id":86460,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/39882\/revisions\/86460"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/86458"}],"wp:attachment":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=39882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=39882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=39882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}