The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. 301 Redirect on a PDF, DOCX files?

    301 Redirect on a PDF, DOCX files?

    Technical SEO Issues
    4 2 16.2k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • IM_Learner
      IM_Learner last edited by

      Hi,

      I have to rename many pdf and docx files. How can I implement 301 redirect on them as they are linked from 'n' number of places?

      Regards,

      Shailendra Sial

      1 Reply Last reply Reply Quote 0
      • KevinBudzynski
        KevinBudzynski last edited by

        Good way from => http://www.henderson.cc/wp/tag/301-redirect/

        While poking around on the Web, I found an article by John Honeck, entitled “Page by Page redirects in IIS for .asp, .html, .pdf, etc.“. He presented an ingenious method for implementing redirection of a PDF document. Rename or remove the old PDF document from the directory. In its place, create a new folder and give it the exact same name as the outdated PDF, including the use of the .pdf extension.

        Inside the new folder, place a default Web page (index.htm, default.htm, etc.). In the head of the default Web page, place meta redirect code. A user (or Google spider) visits the directory, finds an object with the correct name and the default Web page redirects them to the new content!

        Here’s sample code:

        <title>Moved to new URL: http://www.example.com/pdfs/thenewpdf.pdf</title>

        This page has been moved to http://www.example.com/pdfs/thenewpdf.pdf

        If your browser doesn’t redirect you to the new location please click here

        IM_Learner 1 Reply Last reply Reply Quote 2
        • IM_Learner
          IM_Learner @KevinBudzynski last edited by

          Thanks! It worked. But there is a slight correction in the above code. The word "refresh" will be within double quotes.

          1 Reply Last reply Reply Quote 0
          • KevinBudzynski
            KevinBudzynski last edited by

            Good eyes--Fixed!

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • 301 Redirects
              industriestaedt
              industriestaedt
              0
              2
              36

            • Will a Robots.txt 'disallow' of a directory, keep Google from seeing 301 redirects for pages/files within the directory?
              DmitriiK
              DmitriiK
              0
              4
              408

            • Help creating a 301 redirect in my htaccess file
              Felip3
              Felip3
              0
              4
              108

            • Creating a CSV file for uploading 301 redirect URL map
              Dan-Lawrence
              Dan-Lawrence
              0
              3
              2.5k

            • Remove html file extension and 301 redirects
              Tom-Anthony
              Tom-Anthony
              1
              10
              4.0k

            • Help writing a .htacess file with the correct 301 redirects
              mememax
              mememax
              0
              5
              148

            • 301 redirects reverting to 302 redirects
              Devanur-Rafi
              Devanur-Rafi
              0
              6
              532

            • To 301 redirect or not to 301 redirect? duplicate content problem www.domain.com and www.domain.com/en/
              Chris-CA
              Chris-CA
              0
              5
              456

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            • Digital Marketers
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • Local Citation Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter
            Moz logo
            © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy