Email

Safe Handling of Attachments and Links

A practical routine for checking links and attachments before you open them, plus what to do right away if you already clicked.

Key takeaways

  • An unexpected attachment or link deserves verification even when it appears to come from someone you know.
  • Read the real destination domain of a link and the real extension of a file before opening either.
  • Never enable macros, run a program or enter a password just because a document or page tells you to.
  • If you opened something suspicious, disconnect if it ran software, change affected passwords from a clean device and report it quickly.

Before you open an attachment or follow a link, ask whether you expected it, check what it really is, and when in doubt reach the sender or service another way. Most email attacks need you to take that one step, so a few seconds of checking removes much of the risk.

This is not about treating every message as a threat. It is about having a quick routine for the ones that ask you to do something, and knowing which file types and link tricks deserve extra care.

Start with context

Technical inspection helps, but the first question is simple: does this make sense? A shipping notice when you have ordered nothing, an invoice from an unknown company, or a colleague sending a file with only "see attached" and no explanation are all out of pattern.

A familiar sender is not enough. Accounts get taken over and used to mail everyone in the address book, and sender fields can be forged, as described in how forged senders work. Pressure is another signal: threats of account closure, legal action, a missed payment or a prize that expires today.

Should you open it?
Were you expecting this file or link from this person? YES Still glance at the address and file type, then proceed. 1 NO Does it demand urgent action, a login or payment? YES Do not use it. Visit the service from your own bookmark. 2 NO Is the file a program, script, disk image or odd archive? YES Do not open it. Report or delete it. 3 NO Could the sender be real but the request strange? YES Call or message them using contact details you already have. 4 NO Open cautiously or leave it Use a built-in preview, never enable extras, and delete if unneeded. Were you expecting this file or link from this person? 1 IF YES Still glance at the address and file type, then proceed. NO Does it demand urgent action, a login or payment? 2 IF YES Do not use it. Visit the service from your own bookmark. NO Is the file a program, script, disk image or odd archive? 3 IF YES Do not open it. Report or delete it. NO Could the sender be real but the request strange? 4 IF YES Call or message them using contact details you already have. NO Open cautiously or leave it Use a built-in preview, never enable extras, and delete if unneeded.

The visible text of a link can say anything. On a computer, hover over it and read the address shown. On a phone, long-press to preview, taking care not to tap.

Find the domain that actually controls the page. Read the part between https:// and the next single slash, then look at its right-hand end.

Address Who controls it
https://example.com/login example.com
https://accounts.example.com/ example.com
https://example.com.account-check.example.net/ example.net
https://login.example.net/example.com/ example.net
https://[email protected]/ example.org

Familiar words placed on the left or after the slash mean nothing. The anatomy of a web address explains each part, and a URL inspector decodes percent-encoded text.

Other cautions:

  • A padlock or https shows the connection is encrypted. It does not show the site is honest.
  • Shortened links and click-tracking redirects hide the destination. Treat them as unknown.
  • A QR code in an email is a link you cannot read at a glance, covered in QR code phishing.
  • Warning pages from your browser or mail service are worth obeying.

The safest habit for accounts is to skip the link. Open the app or your bookmark, and look for the same notice there.

Attachment types and their risks

Any file can be a lure, but some can run instructions the moment you open them.

Risk level Examples Why
Very high .exe, .msi, .scr, .bat, .cmd, .js, .vbs, .ps1, .lnk Run code or commands
High .iso, .img, .dmg, .pkg, .apk Containers and installers
High .docm, .xlsm, add-ins Can contain macros
Moderate .html, .htm, .svg Open in a browser; can imitate sign-in pages
Moderate .zip, .7z, .rar Hide what is inside, especially with a password
Lower, not zero .pdf, .docx, images Usually data, but can carry links or exploit unpatched software
Layers that stand between an attachment and your data
Mail filtering Blocks many known bad files and sender patterns. Your check Expected? Real type? Sensible request? Restricted viewing Previews and protected views limit what a file can do. Updated software Patches close flaws that crafted files target. Limited account Daily use without administrator rights contains damage. Backups A separate copy lets you recover if the rest fails. Mail filtering Blocks many known bad files and sender patterns. Your check Expected? Real type? Sensible request? Restricted viewing Previews and protected views limit what a file can do. Updated software Patches close flaws that crafted files target. Limited account Daily use without administrator rights contains damage. Backups A separate copy lets you recover if the rest fails.

Check the true file type

Operating systems often hide known extensions, so invoice.pdf.exe can appear as invoice.pdf. Turn on extensions: in Windows File Explorer, look in the view options for file name extensions; in macOS Finder, look in advanced settings for showing all filename extensions. An icon proves nothing, since a program can carry any picture.

Mismatches are possible even with the extension shown. A file type checker compares the file's opening bytes with its name. A type match means the format is as labeled, not that the content is harmless.

Habits that block common tricks

  • Leave protected view on. Office applications typically open downloaded files in a restricted mode and block macros from internet files. A document that tells you to click "Enable content" or "Enable editing" to see it is a classic lure.
  • Be wary of instructions to run commands. No legitimate document, captcha or error page needs you to paste text into a terminal, the Windows Run box or the browser console.
  • Treat password-protected archives with care. A password in the same email mainly serves to keep scanners from looking inside.
  • Question login prompts from files. An attached web page asking for your email password is a fake sign-in page. See how to detect fake login pages.
  • Read permission screens. A link may ask you to grant an app access to your mail or files. That is consent phishing.
  • Ask for another format. If a stranger sends an unusual file, request plain text or a PDF, or decline.

Many "attachments" today are links to a file in a cloud service. They feel official because the notification often comes from a well-known company's systems, and a criminal can create a real share from a real account to get exactly that effect.

Check who shared the item, not only which service sent the notice. Ask whether you expected a document from that person. If the shared page then asks you to sign in again on a different domain, or shows only a button leading elsewhere, stop. A real shared file opens within the service's own site, and your existing session usually covers it.

Calendar invitations deserve the same treatment. An unexpected invite can carry links in its description and may appear in your calendar before you act. Delete or report it without accepting or declining, since a response can confirm that your address is active. Check calendar settings for an option that only adds invitations from known senders.

Messages with a phone number to call work the same way as links. A fake receipt for a purchase you did not make hopes you will dial and be talked into installing remote access software or sharing card details. Check your real account instead.

Online file scanners and previews

Public scanning services check a file against many engines. Remember that uploading may share the file with others, so never upload anything containing personal, client or company data. A clean result also does not prove safety, because new malware may not yet be recognized. At work, send suspicious items to your security team through the report button instead of investigating on your own.

Preparing your devices before anything arrives

Good settings mean one wrong click costs less.

  • Keep automatic updates on for the operating system, browser, mail app, office suite and document reader.
  • Leave built-in security tools running, and do not disable them because an installer asks.
  • Use a standard user account for daily work where your system allows it.
  • Keep at least one backup that ransomware on your computer cannot overwrite, and test restoring from it.
  • Use a password manager, which declines to fill credentials on unfamiliar domains.
  • Turn on a passkey or second factor for important accounts so a stolen password alone is not enough.

On shared family computers, give each person their own account. In a small business, decide in advance whom to call when something goes wrong, and write that number somewhere that does not depend on the affected computer.

If you already clicked or opened

What to do depends on what happened next.

  1. You only visited a page. Close it. Update your browser. The risk is usually low if you entered and downloaded nothing.
  2. You entered a password. Change it immediately from the real site, change it anywhere else you reused it, end other sessions and check recovery settings.
  3. You entered card or bank details. Call the issuer using the number on your card or statement.
  4. You approved an app or sign-in. Revoke the app's access and sessions.
  5. You ran a file or enabled macros. Disconnect the device from the network, tell IT if it is a work machine, and run a reputable security scan. Change passwords from a different, clean device. A full reinstall may be the safest outcome.

What to do after clicking a phishing link goes through each case. Report early, and do not be embarrassed. These messages are designed to catch busy people.

You can make life easier for recipients. Say what you are sending and why, in your own words. Use descriptive filenames. Share large or sensitive items through your organization's approved sharing service with access limited to named people, and avoid asking anyone to enable macros or disable a protection. Link text should match where it goes.

Common questions

Is it safe to preview an attachment?

Built-in previews are generally more restrictive than opening in a full application, but they still process the file. Keep software updated and skip previews of obviously suspicious mail.

Are Macs and phones immune?

No. Some Windows programs will not run there, but fake sign-in pages, malicious profiles, risky apps and software flaws affect every platform.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Email →

Latest news on this topic