Facing 401 Unauthorized Error?
Here’s the fix. But first, listen to this:
Undoubtedly, you’ve come across an error or two while browsing your favorite websites online. These errors are a common nuisance that both webmasters and consumers don’t like to see.
Aínda así, estes inconvenientes conseguen soportar e seguen a molestar á xente aínda hoxe.
But what exactly are these error codes that keep popping up out of nowhere and without explaining why they’ve appeared in the first place?
En definitiva, Internet ou a World Wide Web funcionan baseándose no protocolo de aplicación deseñado para sistemas de información hipermedia distribuídos e en colaboración, tamén coñecidos como HTTP ou Hypertext Transfer Protocol.
Noutras palabras, HTTP permite a comunicación entre clientes e servidores, permitindo así a transferencia perfecta de datos entre ambos.
However, when there’s a communication issue somewhere along the way, an error occurs marked as a response status code. The most common errors are the 4xx ones that represent an issue or a problem. With that in mind, let’s focus on the 401 unauthorized error and how to fix it.
Tipos de erros 4xx
Os erros ou códigos de estado que comezan co número 4 adoitan referirse a erros do cliente. Noutras palabras, os problemas teñen algo que ver coas peticións do cliente ou son directamente provocados polos propios clientes.
What’s more, these errors may indicate if the situation is temporary or permanent. Here are a few examples of 400 códigos de erro.
- Erro 400: Bad Request – In this case, the server will not or cannot process the request due to various reasons, such as invalid request message framing, malformed syntax request, deceptive routing request and so on. Simply put, the server doesn’t understand what you want from it.
- Erro 401: Unauthorized – The focus of our topic today the 401 error is similar to the 403 Forbidden error. It occurs when you try to log in with the incorrect credentials way too many times so the server decides to keep you out. You’ve probably made a typo so shame on you. This lockout is temporary and it usually lasts for 30 min or so. The real issue is when you get this error but you’re certain you didn’t make a mistake.
- Erro 403: Prohibido: todo está ben, pero o servidor négase a tomar medidas. Por que, servidor, por que? O problema máis común here is that there’s probably a problem with permission configuration. Simply put, the server considers that you don’t have the permission to access a resource regardless of your authentication.
- Erro 404: Not Found – The all-time famous “Oops, something went wrong” or “Sorry, the page could not be found” error is probably the most common type of client status codes. As you probably guessed, this error occurs when the resource doesn’t exist or it isn’t available at the moment but may be so in the future.
Now that we have a better understanding of these pesky error codes, it’s time to focus on the 401 one and how to get rid of it.
Corrección do código de erro 401: a perspectiva do usuario
As mentioned before, if you experience the 401 error, it usually means that you’ve provided incorrect login credentials that server couldn’t recognize.
Non obstante, que ocorre cando, de feito, proporciona credenciais de inicio de sesión correctas, pero o servidor aínda lle proporciona unha mensaxe non autorizada?
Isto indica un problema máis profundo que un simple mecanografía. Isto significa que é posible que o servidor web non recibiu as túas credenciais por mor do problema do navegador polo que decide meter un pouco máis con vostede.
Hai algúns xeitos de tentar solucionar este problema e aquí tes exemplos de cada un deles.
1. Comprobe a URL
- In some cases, you type a URL (Uniform Resource Locator) in the browser manually or you have an outdated URL bookmarked so you use that one. It’s a common mistake that can be fixed by checking for spelling mistakes or checking if the URL is still viable.
2. Verifique as súas credenciais de inicio de sesión
- You’d be surprised that typos are the most common reason behind our 401 problem. Spelling mistakes in credentials can be avoided by using tools like Dashlane – you won’t need to re-type credential every time you login.
3. Limpar o historial de navegación e as cookies
- Today, no one clears browsing history or cookies anymore and practically ever. Aside from collecting an abundance of digital junk over time, this habit may also cause a 401 error issue when you try to login to whatever website you prefer.The fact of the matter is that cookies are snippets that store some of your personal information, including login credentials. They can remind a website of who you are but they don’t always work correctly.If you get a 401 but you’re certain it’s not a typo, try clearing browsing history, cookies and cache then try again. Here’s how you can do that.
- Para Mozilla Firefox - Desprácese ata o menú da hamburguesa, faga clic en Opcións, vaia a Privacidade e Configuración e busque Historial, faga clic en Borrar historial e escolla Todo para desfacerse completamente das cookies.
- Para Google Chrome – Got to the dot menu in the upper-right corner, click on it, select Settings > Advanced > Clear Browsing Data.
- Para Safari – Just click on Clear History in the History menu and you’re all set.
4. Vaciar o DNS
- Outro culpable de erros 401 pode ser un problema do servidor DNS (Domain Name System). Afortunadamente, este problema é bastante fácil de solucionar.
- For the Windows OS users – Login to your computer as an administrator. Type “CMD” in search bar to open Command Prompt. Once in Command Prompt, type in the following “ipconfig/flushdns” and hit enter.
- For the Mac OS users – Press Command and Spacebar to open Spotlight search. Once there type “Terminal”. In the command interface, type the following: “sudo killall -HUP mDNSResponde".
- Ademais, intentaches apagalo e volvelo a activar?
Corrección do erro 401: a perspectiva do administrador web
Now that we covered what a 401 unauthorized error is and how to fix it from a client-side, let’s have a look at what webmasters can do to get rid of these errors.
Volver á versión anterior
- Oftentimes, webmasters utilize a CMS (Content Management System) like WordPress, to go about their business. Every CMS requires updates from time to time and these updates can introduce fresh new bugs aside from the ones they’ve fixed. In other words, it’s not uncommon for updates to cause 401 errors. In that case, simply roll back to the previous version prior to update where everything worked fine.
Desinstalar os cambios
- As plataformas CMS, como WordPress é a máis popular, teñen varios complementos que poden axudar a un administrador web. Estes complementos inclúen temas, complementos, widgets etc. Como podes imaxinar, calquera complemento de terceiros pode causar un conflito co sistema do cal un erro 401. En tal escenario, simplemente desinstale todos os complementos que puideran causar un erro.
O impacto dos erros nos usuarios
Por suposto, os erros son un inconveniente. Poden irritar aos usuarios e ter un impacto negativo importante na súa satisfacción e experiencia global, aínda que se produciu un erro porque os usuarios cometeron un erro.
However, an error page and message can be made interesting and even entertaining, in order to minimize and mitigate users’ frustration.
That’s why developers create custom pages for error messages. For instance, you can alter the meta descriptions for error pages to give users context behind the error, as well as instructions to possible solutions to the problem at hand.
But where’s the fun in that? Indeed, a dull message describing a solution to the error may be off-putting, to say the least. That’s why developers oftentimes go a step further to ease the users’ pain.
- As an example, Android’s 404 error page allows you to play a silly but nonetheless divertido xogo. Se tropezaches cunha páxina de erro, pode aproveitalo ao máximo.
- Outro exemplo é Slack’s error page. Although the colorful landscape with interactive pigs and chickens may inflame your frustration further, you can’t help but shed a joyful tear in laughter.
- If you want entertainment, then check out Kualo’s error page. This web hosting company allows you to play the legendary invasores espaciais tipo dun xogo e incluso marca un desconto se alcanza a puntuación máis alta.
En calquera caso, incluso un inconveniente pode ser unha oportunidade para darlle a volta ás cousas e converter a frustración do usuario en non frustrar.
Conclusión
Ao final, descríbese como eres creativo e como pensas achegarche a todo o erro. Seguirán existindo erros por máis que intentes evitalos.
Hai que dicir que, polo menos, podes facer é facer o posible por solucionalos antes de que os usuarios recorran ás antorchas e aos lanzamentos.
The 401 unauthorized error is quite common and mostly a result of a user’s inability to patiently type in their login credentials. Still, this error can happen for other reasons as well.
That’s why it’s important to understand how to approach the problem, as well as understand how to properly solve it.