A password protected URL shortener shows a password prompt before it redirects anyone to the destination, so only people who know the password reach the target page. The lock covers the short link itself and nothing beyond it. Once someone unlocks it, they see the real destination URL and can share it with anyone. If the destination needs protecting, protect the destination. Use the password gate to control who gets routed there.
TL;DR:
- A password on a short link controls the redirect only. The destination URL is exposed to anyone who unlocks it once.
- Server-side password checks can be rate-limited. Serverless "encrypted link" tools can't, so a weak password on them can be cracked offline.
- Short codes are guessable. A six-character base62 code has about 56.8 billion combinations, and researchers have scanned real shortener namespaces.
- The most secure shortener is one where you control password hashing, rate limits, code length, and the domain. In practice that usually means self-hosted.
- Google stopped creating goo.gl links in 2019, and Google Drive has no password feature for share links. Neither one solves this problem.
Table of Contents
- How a Password Protected URL Shortener Actually Works, and Where the Protection Stops
- Four Ways to Put a Password on a Link, Compared
- Serverless Encrypted Links: Free, Clever, and Crackable Offline
- Are URL Shorteners a Security Risk? Yes, in Two Specific Ways
- Which URL Shortener Is the Most Secure? Check These Six Things
- How to Make a Password Protected Link, Step by Step
- Google Drive Links and the Retired Google Shortener
- Get Password-Protected Links That Stay Yours After You Stop Paying
- Frequently Asked Questions
- Sources
How a Password Protected URL Shortener Actually Works, and Where the Protection Stops
When someone clicks a protected short link, the shortener doesn't redirect right away. It serves a page with a password field. If the password matches what's stored for that link, the server sends an HTTP redirect to the destination. If it doesn't match, the visitor stays on the prompt. That is the whole mechanism.
The important detail is what happens after a correct password. The visitor's browser lands on the real destination, and the full URL sits in the address bar, the browser history, and possibly a proxy log. Nothing stops that person from copying the URL and sending it to a group chat. From that point on, the password does nothing, because nobody needs the short link anymore.
So a password protected short link is an access gate for the route, not access control for the content. That makes it a good fit for some jobs and a poor fit for others:
- Good fits. Gating a pre-launch landing page, limiting a promo to people who got the code by email, keeping a printed QR code from working for passers-by, or slowing down casual forwarding of an internal doc link.
- Poor fits. Protecting payroll files, client contracts, or anything regulated. If the destination is reachable without authentication, the password on the short link is a speed bump.
For a fuller breakdown of protecting the destination itself, see our guide on how to protect a URL with a password.
Four Ways to Put a Password on a Link, Compared
Most competing pages show a single product screenshot. The real decision is between four architectures. Each one checks the password in a different place, and that determines how well it holds up.
| Approach | Where the password is checked | Can guessing be rate-limited? | Destination visible after unlock? | Survives if the vendor disappears? |
|---|---|---|---|---|
| Hosted shortener with password feature | Vendor's server | Yes, if the vendor implements it | Yes | No. Links die with the account |
| Serverless encrypted link (static page, often on GitHub) | Your visitor's browser | No | Yes | Partly. It depends on the static page staying up |
| Cloud drive sharing (account-based) | Provider's login system | Yes | No. The file stays behind login | Only while you keep the account |
| Self-hosted shortener with password feature | Your server | Yes, and you set the limits | Yes | Yes. You own the domain and database |
If you only need a gate on a redirect, the self-hosted row is the one we'd pick. It's the only option where you decide the rate limit, the hashing algorithm, and whether the link still works in five years. If the content itself is sensitive, use the cloud-drive row or a real login on the destination. Then shorten that URL however you like.

Serverless Encrypted Links: Free, Clever, and Crackable Offline

People searching "password protected URL shortener github" or "free password-protected link generator" usually find a different design. These are static web pages that encrypt the destination URL with your password in your browser and put the ciphertext in the link. No server stores anything. That sounds more private, and in one sense it is.
The design relies on the URL fragment, the part after #. Under RFC 3986, the IETF standard for URI syntax, the fragment is processed by the client and not sent to the server. The host never sees your encrypted payload. That part is good.
The trade-off is that the encrypted payload is inside the link. Anyone holding the link holds everything they need to attack it. They can copy the ciphertext to their own machine and try passwords as fast as their hardware allows. No server can count failed attempts, and no lockout ever triggers.
A server-checked password can cut an attacker off after 100 failures. A password checked inside the browser can't cut anyone off, ever.
That 100 isn't arbitrary. NIST Special Publication 800-63B tells verifiers to limit consecutive failed authentication attempts on an account to no more than 100. At that cap, a four-digit PIN with 10,000 possibilities becomes very hard to guess online. Offline, the same PIN falls almost instantly.
If you do use a serverless tool, use a long passphrase rather than a short word. Four or five random words is a reasonable floor. Treat the link as roughly as sensitive as the destination.
Are URL Shorteners a Security Risk? Yes, in Two Specific Ways
URL shorteners create two real risks. The first is the one everybody knows. The second is the one that matters for password protection.
Risk one: hidden destinations
A short link hides where it goes. That is why phishing campaigns use shorteners and why many security teams train staff to be wary of them. A password prompt makes this slightly worse, because a phishing page that asks for a "link password" looks like a normal step to a careless reader. If you send protected links to customers, use a branded domain they recognize instead of a generic shared one. Our article on custom domains and real ownership covers why.
Risk two: guessable short codes
Short codes are short by design, so they can be enumerated. In "Gone in Six Characters: Short URLs Considered Harmful for Cloud Services", Cornell Tech researchers Martin Georgiev and Vitaly Shmatikov scanned short-URL namespaces. They found links pointing to cloud-stored documents and map directions that their owners never meant to publish.
Here is the math. A six-character code drawn from upper case, lower case, and digits (base62) has 62^6, about 56.8 billion, combinations. Seven characters gives about 3.5 trillion. Those numbers look large, but an automated scanner doesn't need to find a particular link. It only needs to find any link worth having.
This is where a password helps. Even if someone stumbles onto your short code, they meet a prompt instead of your destination. Treat code length and the password gate as a pair: longer random codes for private links, plus a password for anything you wouldn't want a stranger to find.
Which URL Shortener Is the Most Secure? Check These Six Things
No brand name answers this question. The answer is the shortener that gets these six things right. If you can't verify them, assume they're missing.
- Password hashing. Stored link passwords should be hashed with a slow algorithm, not saved in plain text. The OWASP Password Storage Cheat Sheet recommends Argon2id first, then scrypt, bcrypt, or PBKDF2 where those aren't available.
- Rate limiting on the prompt. Failed attempts per link and per IP address should be throttled. Without this, a server-side password has the same weakness as a serverless one.
- Configurable code length. You should be able to issue long random codes for private links and short readable ones for public campaigns.
- HTTPS on every hop. That includes the password form. A password sent over plain HTTP is visible to anyone on the network.
- No public sign-up on your domain. If strangers can create links on the same domain as yours, your branded domain can end up hosting their phishing.
- Control of the data. Ask who can read the list of links, passwords, and click logs, and what happens to them if you stop paying.
On a hosted service you trust the vendor on all six. On a self-hosted shortener you can check all six yourself, because the server is yours. For most teams that hand out private links regularly, that's why we'd choose self-hosting.
Pro Tip: If the destination must stay private even after someone unlocks the link, don't use a redirect at all. Set the password gate to proxy or serve the content directly, or put the destination behind its own login. A redirect always hands the visitor the real URL. A proxy doesn't. Few shortener feature pages mention this difference, and it's the one that decides whether forwarding defeats your protection.
How to Make a Password Protected Link, Step by Step

The process looks almost the same on any shortener that supports it. Here's the version that holds up:
- Decide what you're protecting. If it's the content, lock the destination first, using a drive permission, a login, or a signed download URL. The short link's password is a second layer, not the only one.
- Create the link with a long random code. Use seven or more characters for anything private, not a guessable slug like
/q3-pricing. - Set a passphrase, not a PIN. Four random words beat
1234by many orders of magnitude, and recipients can still type them. - Add an expiry date if the tool supports it. A link that stops working after the campaign can't leak next year.
- Send the password through a different channel. If the link goes by email, send the password by text message or say it on the call. A link and password in the same message protect nothing from whoever reads that message.
- Watch the click log. A spike of failed attempts from one location tells you the link has been forwarded. Our guide to link click tracking explains what to watch.
The same steps cover a password protected download link. Remember the earlier point: if the file sits at a public URL, the password guards the shortcut, not the file. Use expiring, signed URLs from your storage provider for the file itself.
Google Drive Links and the Retired Google Shortener
Two Google questions come up in nearly every search on this topic, and both have short answers.
Can you password protect a Google Drive link? Not with a password. Drive's sharing model is account-based. You restrict a file to specific Google accounts or to "anyone with the link." For truly private files, the account restriction is stronger than any link password. The catch is that your recipient needs to sign in. If you set the file to "anyone with the link" and add a password-protected short link in front of it, you've built a gate with an open side door. The Drive URL works without the password.
Does Google still have a URL shortener? No. As the Google Developers Blog announced, Google stopped allowing new goo.gl links in 2019. It later began retiring existing ones, keeping only links it judged to be actively used. Millions of links printed in slides, papers, and on packaging were affected by a decision their owners had no say in. If you're choosing a shortener for links that need to last, that history matters more than any feature list. We cover it in picking a URL shortener you'll still control in five years.
Get Password-Protected Links That Stay Yours After You Stop Paying

Kortli is a self-hosted link shortener that you install on your own Linux server for a one-time license fee instead of a monthly subscription. Password-protected links are built in. Because the server is yours, the password check, the click logs, and the failed-attempt records stay on your own machine. You can also run password-protected links on your own branded domains, with no per-domain fee. Add A/B split testing and logo-embedded QR codes, and the setup that would sit on a recurring plan elsewhere costs you once.
The honest limit: self-hosting means the server is your responsibility. Updates, backups, and HTTPS certificates are your job, and Kortli can't fix a destination you left public. Check our spec sheet against the six-point checklist above before you buy, and judge us by the same standard you'd apply to anyone else.
Frequently Asked Questions
Is a password protected short link safe for confidential files?
Not on its own. The password only controls the redirect, so anyone who unlocks the link sees the real destination URL and can share it. For confidential files, restrict access at the destination with a login, account-based sharing, or an expiring signed URL.
Are free password-protected link generators safe to use?
Many free tools encrypt the link in your browser, which keeps the host from seeing your destination. Because the encrypted data travels inside the link, anyone holding it can guess passwords offline with no lockout. Use a long passphrase of several random words if you rely on one.
Which URL shortener is the most secure?
The most secure shortener hashes link passwords with a slow algorithm such as Argon2id or bcrypt, rate-limits failed attempts, issues long random codes, and uses HTTPS everywhere. It also keeps strangers from creating links on your domain. A self-hosted shortener lets you verify all of these yourself instead of trusting a vendor.
Does Google still have a URL shortener?
No. Google stopped creating new goo.gl links in 2019 and later began switching off existing ones, keeping only links it considered actively used. Anyone who needs short links that last should use a shortener on a domain they control.
Can I password protect a Google Drive link?
Google Drive doesn't offer passwords on share links. Instead, you limit access to specific Google accounts or to anyone with the link. Restricting to named accounts is the stronger option, though recipients have to sign in.
How long should a password on a short link be?
For server-checked links with rate limiting, a passphrase of three or four random words is plenty. For serverless encrypted links that can be attacked offline, go longer, five or more random words, because no lockout will ever stop repeated guessing.
Sources
- Password Storage Cheat Sheet | OWASP Cheat Sheet Series
- NIST Special Publication 800-63B: Digital Identity Guidelines, Authentication and Lifecycle Management | National Institute of Standards and Technology
- Gone in Six Characters: Short URLs Considered Harmful for Cloud Services | arXiv (Georgiev & Shmatikov, Cornell Tech)
- RFC 3986: Uniform Resource Identifier (URI): Generic Syntax | IETF / RFC Editor
- Google Developers Blog | Google

Leave a Reply