Easily Build Your Own Custom URL Link Shortener for Free

Easily Build Your Own Custom URL Link Shortener for Free

12.Aug.2021

in this video I'm going to show you a
super fast super simple way to manage
your website redirects now there's an
option of using something like bitly or
a URL shortener which unfortunately a
lot of times they cost money in order to
access all their features there's also
the option of downloading and installing
a wordpress plugin
but in my experience that has been very
bloated
you know between the time that a user
clicks on your link and actually ends up
at the destination a couple seconds
could pass and in that time the user has
a lot of potential to bail and just
close out and move on with whatever he's
doing so we want this to be as quick as
possible in order to do that we're gonna
work directly with our website server in
the case it's gonna be Apache so let's
figure out how to do this and show you
this really simple way to manage your
redirects so right now just for the sake
of explanation I have my website Tony
flow com
it's a dummy website we're only going to
use this for linking to other things so
for example this is going to be the base
of my links and then it's gonna be like
slash SEM Rush if I'm gonna recommend a
product from SEM rush or it's going to
be slash Namecheap if I'm going to
recommend a product from Namecheap so
that's basically the explanation what I
want you to do is go into your terminal
window in SSH into your website you
don't know how to do that I'll have a
tutorial up here for you guys to follow
so I'm going to just log in to mine
and once you're here you can take a look
around but for me we want to go into the
Tony flow comm folder and right here
user see that simple index page which is
displaying hello world we're going to
make an additional two files in here the
first one being the HT access file so
use your editor of choice and make that
file so for me it's of vim and then
htaccess now in here the first thing we
want to do is just add this this one
line options space indexes and this is
going to prevent a directory listing of
your website anyway let's add our first
redirect so add a space and then type in
redirect and now here you can put 301
302
a lot if there's a lot of debate about
which one's the best I'm gonna just pick
three or two for now it's a temporary
redirect as opposed to 301 which is a
permanent redirect and we're gonna type
in the source URL so that's gonna be
Tony flow slash and then whatever you
want to tackle into that so for me let's
try SEM rush and then the destination is
going to be the target so over here I
have my landing page for my SEM rush
affiliate link and this is where you can
get a 14-day free trial for a whole
bunch of SEO tools that's basically what
I want to redirect to so let's paste
that in here and then just to explain
one more time redirect 302 your source
and your destination the source is
relative the destination is absolute so
go ahead and write that out and we can
actually close out let's try it out so
let's open up a new tab go to Tony flow
comm slash SCM Rush and if this works
out we should be taken to that landing
page and as expected we are landed on
the landing page which is perfect that's
exactly what I wanted to do it was super
quick and the thing is you can add as
many of these as you want so if you
wanted to add another affiliate link we
can make a whole nother line here and
just do the same exact thing so let's
let's do a simple one which doesn't make
any sense actually let's do a cool one
at Tony flow comm /youtube that is a
cool one let's get rid of all this and
I'll make this one link to my youtube
channel so because I don't have that
cool shortened URL for YouTube that's my
studio we have to go to youtube actually
those are linked here let's go to my
channel let's copy this URL and let's
paste it in here
write it save it close out of here and
test it out so Tony flow comm slash
u-tube
it redirects you directly to my youtube
channel all right that is actually
there's one other thing we should
probably do if you are not if you're if
your so let me explain this if you are
purchasing a domain name for the sake of
just having it be redirected and you're
not reusing your actual domain name for
your website you probably want to add a
robot's file because I did say we're
gonna make two files here so make a new
file robots dot txt and in here we want
to just prevent Google from crawling any
pages on our website because again this
is just for the sake of redirects so I'm
type in user - agent colon star and then
this allow colon slash so basically this
is telling any BOTS especially Google
not to crawl your website so right that
see that that's not going to change
anything we can still go to Tony flow
dot-com slash sem rush and it should
redirect us to the destination without
any issue which it does thank you guys
for watching this video if you found it
useful definitely give it a thumbs up
and if you really found it useful I'd
definitely subscribe to my channel
there's plenty of other videos like this
about how to do a lot of these behind
the scenes stuff for a website that
usually you would have to hire a web
developer for I know that a lot of you
are very smart and you can handle it on
your own you just need a tutorial to
help you get there so that's what this
channel is all about if you subscribe I
will see you in the next video

We are social