13 replies
  • SEO
  • |
I guess this could be loosely tied to this part of the forum. I would like to know if there is a way to export all the broken links through webmaster tools and then use a code in .htaccess to make all those urls do a permanent re direct to some particular page or home page?

I did find a code to send all broken urls to homepage but I need something to send a particular set of urls to some page. I guess I need to upload that file to my files in cpanel and then do something that calls the file but how??
#htaccess #question
  • Profile picture of the author ajeetsing21
    Yes, In webmaster you can see broken link under crawl errors then you can redirect all links.
    Signature
    {{ DiscussionBoard.errors[9005622].message }}
  • Profile picture of the author yukon
    Banned
    Your better off running Screaming Frog & finding all the 404s, because GWT will only show 404s that they've found when crawling your pages which doesn't mean they've found every single 404 (yet), where Screaming Frog will show you every single 404 in real time.

    Screaming Frog will also show you external 404s that your own web pages are linking out to.

    I use FileZilla (free) for FTP. Create the htaccess file on your offline desktop, run FileZilla & drag the new htaccess into your sites root folder. Done. You can find code on Google for the htaccess redirect.






    If you have Cpanel on your host you can do redirects from there, it writes the htaccess code/file for you. Example, Hostgator Cpanel redirect video below.


    {{ DiscussionBoard.errors[9005725].message }}
    • Profile picture of the author darrenlc
      ErrorDocument 404 http://yourdomain.com

      Try adding that line of code to the top of your ht.access file replacing yourdomain.com to the page you want to redirect to. It should send all broken links to a set page of your choice.
      {{ DiscussionBoard.errors[9005874].message }}
    • Profile picture of the author MikeFriedman
      Originally Posted by yukon View Post

      Your better off running Screaming Frog & finding all the 404s, because GWT will only show 404s that they've found when crawling your pages which doesn't mean they've found every single 404 (yet), where Screaming Frog will show you every single 404 in real time.
      Actually, I would use both. Screaming Frog will find 404 errors from your internal links, but WMT will find links from other sites to pages that no longer exist on your site. Screaming Frog has no way of finding those.
      Signature

      For SEO news, discussions, tactics, and more.
      {{ DiscussionBoard.errors[9005891].message }}
      • Profile picture of the author yukon
        Banned
        Originally Posted by MikeFriedman View Post

        Actually, I would use both. Screaming Frog will find 404 errors from your internal links, but WMT will find links from other sites to pages that no longer exist on your site. Screaming Frog has no way of finding those.
        My 404 redirect will catch broken backlinks.

        I know you don't like that setup but it works & I've been doing it for a few years, I never have 404s. Never have to mess with it once the site is setup.
        {{ DiscussionBoard.errors[9005930].message }}
        • Profile picture of the author MikeFriedman
          Originally Posted by yukon View Post

          My 404 redirect will catch broken backlinks.

          I know you don't like that setup but it works & I've been doing it for a few years, I never have 404s. Never have to mess with it once the site is setup.
          Yeah, I hate that setup.

          It might be worth recreating the pages or some new page if there are good links coming in. I would rather do that than redirect a page to the homepage anyhow.
          Signature

          For SEO news, discussions, tactics, and more.
          {{ DiscussionBoard.errors[9005942].message }}
          • Profile picture of the author yukon
            Banned
            Originally Posted by MikeFriedman View Post

            Yeah, I hate that setup.

            It might be worth recreating the pages or some new page if there are good links coming in. I would rather do that than redirect a page to the homepage anyhow.
            I hate 404 pages, they're the worst thing anyone could have created for the web.

            Here's an example of how to get rid of traffic.

            Now If that broken URL was pointing at my site, traffic would have been sent to a working page without me having to mess around with it.
            {{ DiscussionBoard.errors[9006285].message }}
            • Profile picture of the author Tom Ryan
              Originally Posted by yukon View Post

              I hate 404 pages, they're the worst thing anyone could have created for the web.

              Here's an example of how to get rid of traffic.

              Now If that broken URL was pointing at my site, traffic would have been sent to a working page without me having to mess around with it.
              How do you set it up to redirect all 404s to the homepage?
              Signature


              {{ DiscussionBoard.errors[9006318].message }}
            • Profile picture of the author MikeFriedman
              Originally Posted by yukon View Post

              I hate 404 pages, they're the worst thing anyone could have created for the web.

              Here's an example of how to get rid of traffic.

              Now If that broken URL was pointing at my site, traffic would have been sent to a working page without me having to mess around with it.
              I'm not arguing for bad 404 pages. That example is awful and something I would never allow on a site.

              Not having 404s and just redirecting to a homepage is bad for the users.
              Signature

              For SEO news, discussions, tactics, and more.
              {{ DiscussionBoard.errors[9006332].message }}
              • Profile picture of the author yukon
                Banned
                Originally Posted by MikeFriedman View Post

                Not having 404s and just redirecting to a homepage is bad for the users.
                It's not bad for users, they're landing on the mother of all pages on my site.
                {{ DiscussionBoard.errors[9006351].message }}
                • Profile picture of the author paulgl
                  Originally Posted by yukon View Post

                  It's not bad for users, they're landing on the mother of all pages on my site.
                  I like to have a soft landing with a custom page. Visitors need some type of explanation,
                  complete with a plethora of options, even advertising your other sites.

                  Paul
                  Signature

                  If you were disappointed in your results today, lower your standards tomorrow.

                  {{ DiscussionBoard.errors[9006914].message }}
  • Profile picture of the author seekdefo
    thanks guys for all the replies, however adding ErrorDocument 404 doesn't seem to be working. Am I supposed to upload a file named ErrorDocument?
    Signature

    Brevity is the soul of wit

    {{ DiscussionBoard.errors[9006884].message }}

Trending Topics