DEV Community 👩‍💻👨‍💻

Cover image for The safest url shortener for the WEB
NarayaN Yaduvanshi
NarayaN Yaduvanshi

Posted on

The safest url shortener for the WEB

Almost all url shortener that I see today on world wide web comes in 2 simple part.
https://bit.ly/3jR0OWU

  • Domain name
  • combination of 6 alpha numerics.

When you click on it, it takes you to a long url.

Problem

I as a user have no idea where these 6 alpha-numeric phrase mystery will take me.
Let me take another eg:
Below I have 2 short URLs. One of them will take me to youtube website and other to a NSFW website. Can you tell me which one does what?

  1. https://bit.ly/2Uf76Xz
  2. https://bit.ly/3jR0OWU

(Don't be idiot like me and click these URLs without headphones on)

To me, this is a problem, links are meant to inform you where they are taking you by their domains names. I like to not have surprises.

Solution

Below are 2 short URLs, Can you again take a look at them and tell me if you can figure out which short URL takes you to youtube and not the NSFW website.

  1. https://allurl.one/7bj0_p6idG/redtube.com
  2. https://allurl.one/y-uSm2dP_8/youtube.com

I have added target domain as the third part of the url, so that web users can take an informed decision whether to click it or not.

There it is, I believe this will make the web a little secure and links trustworthy. I means back to old times. Cheers

Also,

If we go ahead with just the domain name and short code, we should give a choice to users whether they want to redirect to that site or not.

https://allurl.one/y-uSm2dP_8

Clicking the above URL will take you to redirection page where it will inform you about the destination and give you a choice to abort or proceed. Just like this picture.
choice to redirect

Top comments (0)

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.