Please enable JavaScript to use CodeHS

Cybersecurity basics

Is Public Wi-Fi Safe? Meet the evil twin.

Your phone sees a list of Wi-Fi names and picks one. But a name is just a label, and anyone can type any label they want. Learn how a fake network works, what it can and cannot see, and practice picking the safest connection in a coffee shop.

Cybersecurity ~15 min Beginner friendly
The Short Answer

Mostly fine for everyday browsing. Not fine for everything.

You sit down in a coffee shop and want to get online. Is the free Wi-Fi safe? The honest answer is "it depends on what you do and which network you join."

Two things changed over the years. Good news: most websites now use HTTPS, a lock-style protection that scrambles what you send. Also good: that scrambling makes it much harder for a stranger on the same Wi-Fi to read your messages.

The catch: you can still be tricked into joining the wrong network, or into typing a secret into a fake page. That is where the "evil twin" comes in. It is not a movie hacker. It is just a copy of a name.

Words to know. Wi-Fi is a way to connect to the internet without a cable. A router is the box that sends the Wi-Fi signal. A network is the group of devices connected through it. Think of a router like a shop's front door: everyone enters through it.


Idea 1

A Wi-Fi name is just a label

Every Wi-Fi network has a name, called an SSID (say it "ess-ess-eye-dee"). It stands for Service Set Identifier, but you can think of it as a name tag. The router shouts its name tag all day: "I'm BrewBean_Guest! I'm BrewBean_Guest!"

Here is the catch. Nobody checks name tags. Any router, or even a laptop or a phone hotspot, can wear any name it likes. Two networks can have the exact same name at the same time.

When more than one nearby network shares a name, many phones simply choose the one with the strongest signal. That is usually the one closest to you. An evil twin is a network an attacker sets up with a copy of a real name, hoping your phone picks it.

Try it Move the twin closer

The phone is the same distance from the real router the whole time. Slide the attacker's laptop closer and watch which network the phone joins.

Diagram of a phone, a real router, and an evil twin laptop The phone sits in the middle. The real router is on the left. The attacker's laptop on the right broadcasts the same name. A line shows which one the phone is connected to. Real router BrewBean_Guest Your phone joined: Real router Evil twin BrewBean_Guest
Far away Next to you
Real routerStrong
Evil twinWeak

Is it really that easy? Setting up a copy is easy. Getting people to use it is the hard part, which is why attackers like busy places like cafés and airports. Real phones also have extra rules, such as sticking with a network they are already on. The lesson is simple: never trust a name by itself.


Idea 2

What can a snooper actually see?

Say someone is running an evil twin, or just watching an open network. Your data passes through their device on the way to the internet, like a letter passing through a stranger's hands before it reaches the mailbox.

What they can read depends on how the letter is packed. Computers send data in small pieces called packets. Pick a setup below to see what a snooper's screen shows while you visit a made-up bank website.

Try it The snooper's screen
Choose how your connection is protected
snooper-view / pretend democapturing packets...

    What HTTPS does

    • Scrambles the page you read and anything you type, like passwords.
    • Checks that the website is who it says it is, using a certificate. A certificate is like an ID card for a website.
    • Does not hide the site's name. The snooper can still see you visited mybank.example.

    What a VPN adds

    • A VPN (virtual private network) wraps all your traffic in one scrambled tunnel to a company's server.
    • The café network sees only "this phone talks to a VPN server."
    • It does not remove trust. The VPN company can see where you go instead. Pick a provider you trust.

    The real trick is tricking you. An evil twin cannot read HTTPS pages. So it often tries to get you to give things up: a fake sign-in page that asks for your email password, or a browser warning you click past. The next challenge practices exactly that.


    Practice

    The Coffee Shop Challenge

    You are at BrewBean Café with a laptop and a phone. Five situations come up in a row. Pick the best choice for each one. You earn up to 3 points per round, and every answer comes with an explanation.

    Game BrewBean Café
    Round 1 of 5 Score: 0

      Your Plan

      Build your safe Wi-Fi habits

      Safety comes from small habits, not from one magic tool. Tick the ones you already do, or plan to start, and watch your score grow. Nobody is checking. This is just for you.

      0 / 7


      FAQ

      Quick answers

      Is public Wi-Fi safe?

      It is safer than it used to be, because most websites now use HTTPS. It is still not risk free. A fake network can copy a real one, and an open network lets other people on it try to watch or tamper with traffic. Use HTTPS sites, skip sensitive tasks on open Wi-Fi, and use your phone hotspot when it matters.

      What is an evil twin network?

      An evil twin is a Wi-Fi network set up by an attacker that uses the same name as a real network. Devices that join by name and signal strength may connect to the copy instead of the real one. Once connected, the attacker sits between you and the internet.

      Can someone see my passwords on public Wi-Fi?

      Not on a site that uses HTTPS, because your password is scrambled before it leaves your device. On an HTTP site with no lock, it can be readable. The bigger risk is being tricked into typing a password into a fake page, so never enter an account password on a Wi-Fi sign-in page and never click through a certificate warning.

      Does a VPN make public Wi-Fi safe?

      A VPN hides your traffic and the sites you visit from the local network, which helps on public Wi-Fi. But the VPN company can then see that traffic, so you are choosing who to trust. A VPN does not stop phishing, malware, or a site that lies to you.

      What is the safest way to get online in a coffee shop?

      Your own phone hotspot is usually the safest choice, because the network is private to your devices. If you use the shop Wi-Fi, confirm the exact network name with staff, prefer a network that needs a password, stick to HTTPS sites, and forget the network when you leave.

      Should I turn off auto-join for Wi-Fi networks?

      For open public networks, yes. If your phone remembers a network name, it may join any nearby network with that name, including a fake one. Use Forget This Network after you leave, and turn off auto-join for networks you do not control.


      Check yourself

      Quick quiz

      1. Why can an evil twin copy a real Wi-Fi network?

      2. You are connected to an evil twin, and you visit an HTTPS website. What can the attacker most likely see?

      3. Your browser shows a full-page "Your connection is not private" warning on café Wi-Fi. What is the best move?


      Keep learning

      Now that you can spot a copycat network, go deeper into the tools that protect you, or take a full course and build your own security skills.

      Related: What is phishing?