Newwebs Techs logo Newwebs TechsBuilding websites, explained for beginners
Maintenance and Security

How to Set Up Two-Factor Authentication on Your Website

Most small websites that get broken into are not hacked through clever code. Someone logs in with a password that leaked from another service, and from that moment they own your site.

A laptop showing a website login screen beside a smartphone displaying a six digit code and a small USB security key on a tidy desk

Most small websites that get broken into are not hacked through clever code. Someone logs in with a password that leaked from another service, and from that moment they own your site. Turning on two-factor authentication blocks almost every one of those logins, and it takes about ten minutes per account.

The trouble is that a website is not one account. It is a hosting panel, a domain registrar, a content management system and an email inbox, and attackers only need the weakest of them. This guide covers where to turn it on, which method to choose, and how to avoid locking yourself out.

What two-factor authentication actually does

A password is something you know. Two-factor authentication, often shortened to 2FA, adds a second check based on something you have, usually your phone or a small hardware key. Even if someone has your password, they cannot log in without that second factor.

Microsoft has reported that multi-factor authentication stops more than 99 percent of automated account attacks. Those numbers come from large services, but small sites face exactly the same automated password attempts, often thousands per day against a single WordPress login page.

Where to turn on two-factor authentication first

Work through your accounts in order of how much damage a takeover would cause. For most site owners the list looks like this:

  1. Your email account. Every other password reset goes through it. If someone controls your inbox, 2FA elsewhere can be bypassed with a reset link.
  2. Your domain registrar. Whoever controls the domain controls where your site and email point. A hijacked domain is one of the hardest problems to undo, as our piece on what happens when a domain expires shows from a different angle.
  3. Your hosting account and control panel. This gives access to files, databases and backups.
  4. Your CMS admin accounts. WordPress, Joomla and similar systems, for every user with admin or editor rights.
  5. Your CDN or DNS provider, and any payment or analytics accounts linked to the site.

Most registrars and hosts hide the setting under Account, Security or Login settings. If yours does not offer two-factor authentication at all in 2026, that is a good reason to consider moving.

Choosing a method: app, key or text message

MethodHow it worksCostProtection
SMS codeA 6 digit code is texted to your phoneFreeBasic, vulnerable to SIM swap fraud
Authenticator appAn app generates a new 6 digit code every 30 secondsFreeStrong for most site owners
Hardware security keyA USB or NFC key you tap to confirmAbout 25 to 55 pounds per keyStrongest, resists phishing
PasskeyYour device confirms with a fingerprint, face or PINFreeStrong, resists phishing, support still growing

For most people an authenticator app is the right default. Microsoft Authenticator, Google Authenticator, 2FAS and Aegis all work with the standard codes used by hosts and CMS plugins. Choose one that can back up its codes to an encrypted cloud account or export them, so a lost phone does not mean lost access.

If you manage sites for clients or run a shop, buy two hardware keys and register both on your email and registrar accounts. Keep one on your keyring and one somewhere safe at home.

Setting it up on a WordPress site

WordPress does not include two-factor login out of the box, so you need a plugin. Well maintained options include Two Factor, WP 2FA and the login security module in Wordfence. The steps are similar for all of them:

  1. Take a full backup first. Our guide on backing up your website and testing the restore explains how.
  2. Install and activate one 2FA plugin only. Running two at once causes login conflicts.
  3. Go to your user profile, choose the authenticator app method and scan the QR code with your app.
  4. Enter the current 6 digit code to confirm it works.
  5. Download or print the backup codes the plugin generates.
  6. Log out and log back in to test the whole flow before you close the setup screen.

Then require 2FA for every user with the Administrator or Editor role. Subscriber and customer accounts can stay optional.

If you use a hosting control panel such as cPanel or Plesk, look for its own two-factor setting as well. It protects the panel login, which is separate from the WordPress login and gives far wider access. While you are there, remove any old user accounts left behind by former developers or freelancers. An unused admin account with a weak password and no second factor is exactly the kind of door automated attacks look for, and it costs nothing to close.

Why I do not tell people SMS is useless

Security articles often say SMS codes are so weak you should never use them. I disagree with the way that advice lands on small site owners. SMS is weaker than an app because a determined attacker can trick a mobile network into moving your number to their SIM. But that attack takes effort and targets specific people. The everyday threat to a small website is automated login attempts with leaked passwords, and SMS stops those completely.

So if a service only offers text codes, turn them on. A site owner who skips 2FA because the only option is "insecure" SMS ends up with no second factor at all, which is far worse. Upgrade to an app or a key wherever one is offered, starting with email and the registrar.

How to avoid locking yourself out

  • Store backup codes offline. Most services give 8 to 10 single use codes. Print them, or save them in a password manager that is not protected only by the same phone.
  • Register a second method wherever possible, such as a second key or a backup phone.
  • Keep your recovery email and phone number current. An old work address is a common reason people cannot recover an account.
  • Check access before changing phones. Move your authenticator app to the new device and test a login before wiping the old one.

Add a reminder to review these settings once a year, alongside the other checks in keeping your website secure and up to date.

Frequently asked questions

Is two-factor authentication worth it for a small website?

Yes. Small sites face the same automated login attacks as large ones, and two-factor authentication blocks nearly all of them. Setup takes a few minutes per account and costs nothing with an authenticator app.

What happens if I lose my phone with my authenticator app?

Use one of the backup codes you saved during setup to log in, then register your new phone. If you have no codes, you will need to go through the service's account recovery, which can take days. That is why saving codes offline matters.

Which is better, an authenticator app or SMS?

An authenticator app is better because its codes cannot be redirected by SIM swap fraud. SMS still stops automated password attacks and is much better than no second factor. Use the app wherever it is offered.

AH
Astrid Holm

Astrid writes about designing and looking after websites, focused on clarity, usability, and sensible upkeep.

More posts by Astrid

More in Maintenance and Security

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto