Creating dynamic link/ URL shortener with custom domain using Google Firebase

·

3 min read

I was checking for some PHP scripts which I could use as a URL shortener with my own short and easily remembered domain. Lately I discovered that google was providing this awesome service for free.

Google replaced its URL shortener service goo.gl with Dynamic Links firebase.google.com/products/dynamic-links providing more features and flexibility. Pros : 1) Can be configured with your own custom-domain - I was able to register a TLD which is not that costly and use it as a URL shortener (arun.fyi) 2) Can be configured as a dynamic link, if you own android and iphone apps, you can redirect the link behaviour to open in the respective apps. 3) Analytics is provided for the dynamic links created. 4) You can define your own dynamic link and change the deep links behind. For example : I created the link arun.fyi/mp3 to redirect to some page in a6unraj.com domain 6 months ago and now I no longer want to use that domain, so I changed the deep link behind and now it redirects a page in different domain( arunraj.eu ).

The setup is quite easy

  1. Buy the domain
  2. Create a project in Firebase console console.firebase.google.com/project/_/durab..

image.png

image.png

image.png

image.png

3.Setup URL Prefix

image.png

image.png

image.png

image.png

4.Setup A records in the DNS settings where the domain was registered I have setup URL prefix for arun.fyi

5.Start using the service once the URL prefix setup is completed.

image.png

6.Click on New Dynamic Link and you can define your own link

image.png

image.png

Setup behaviour for android and iphone apps image.png

image.png

Setup meta tags for social media platforms

image.png

image.png The dynamic link is all setup and you can try it arun.fyi/clock