April 10, 2020
How to redirect to a custom 404 page with htaccess

How to redirect to a custom 404 page with htaccess

hi guys and welcome to this 404 redirect
video one of my website customers has asked me to build a custom 404 page for
their website that’s fine I’ve built a page real easy
to do just like any other page and there it is but I’ve put it up on the site it’s indexed
with the rest of the pay views on the site but if you put in a bad reference
here and I’ll just say fish what of a better word because I know there’s
nothing there with that name I want it to pop up with that page and at the
moment it’s just popping up with the generic not found page here
so how do you get around there this site itself let’s go back it’s hosted on
GoDaddy so if I go into the GoDaddy file manager I know you can edit the HTS file
but problem is there isn’t one so let’s create one by hitting the new
button here like like I say this is GoDaddy and it’s a cPanel most of these
have a similar system so dot HT access create that file there you and if we scroll down should be here
somewhere that is okay and
we’ll click on it should let us edit it now we need to put in a bit of code here
and I wanted to tell it at the error document so error document 404 which is
the generic one and where do I want it to go well I want
it to go to that custom era page that I created which was 404 dot html’ but if you want it to go back
to your homepage you just put index.html there or whatever your home pages or
wherever else you want to send it now let’s save this you and it’s good back to our site okay so
we’re at the front page here let’s try putting something stupid in again like I
hope her fishing again put it a while putting fish but I know there’s no fish
page on that okay so this time it’s redirected to my custom 404 page which
is what I wanted so it’s fairly easy to do let’s just go back and let’s put in
index dot HTML and it should redirect say that should redirect now to the homepage let’s go to a different page
and now let’s try that that should redirect the homepage this
time yep there we are we’re back to the home
page okay well let’s redirect it to the contact us
page here let me go back to the home page
you you there was contact HTML I’m sure it was contact us I’ll contact – us HTML gotta
get that right – earth dot html’ and won it twice that
will not work save it back to our site okay just make sure
to go to the classified page back to the homepage
now let’s how did I put in stuff let’s put in food must be hungry and there we are it’s
taking us to the contact page there so I’ll just put it back how I wanted it
which was to that custom 404 page you you and it’s saved now let’s go back to the site let’s go
back to our homepage again let’s put in something stupid box
random word here that should go to that custom 404 page there we go
so that is how to create an HT a excess file in your file manager there and have
your custom 404 page redirect or have it redirect to your custom 404 page on your
site that works with GoDaddy it seems to work with most providers I’ve tried it
on I page as well that works fine there so I hope that’s been useful to you once
again this is Jamie from system 22 and a web design and tech tips comm thanks for
watching have a great day

Leave a Reply

Your email address will not be published. Required fields are marked *