DEV Community

Discussion on: How to create your own custom URL shortener in 10 minutes for free & deploy to GitHub 🚀

Collapse
 
nelsonvassalo profile image
nelsonvassalo • Edited

Hi, I might be missing something but how does the shortener work after instalaltion and deployment? Because I only see my shortener attached to my URL as an hash. I though the purpose was to have something like nl.sn redirect to my site and instead I get the whole URL, like www.dummysite.com/mnml/src/#sn Am I misunderstanding the concept? Thanks

Collapse
 
liyasthomas profile image
Liyas Thomas • Edited

Concept is to map one custom (and preferably a short domain like goo.gl, bit.do etc) URL say dummysite.com#abc to this_is_a_very_very_long_and_ugly_URL.com/still_long/blah_blah_blah.

That's pretty much all about a URL shorter.

You can make your URL shortener like dummysite.com#abc after moving contents from src to root of your hosting site to remove mnmlurl/src extension from your domain. For hosting in such custom domains, Its advised to npm build and upload output folder. Hosting on GitHub pages was just for proof of concept.

Shortened URL is a branded one and users can easily get what this URL is for. Sites like Twitter have a character limit on posts that wont allow users to post long URLs. So URLs must be short and concise.