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. Subdomains & CDNs

    Subdomains & CDNs

    Technical SEO Issues
    5 3 419
    • 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.
    • ahirai
      ahirai last edited by

      I've set up a CDN to speed up my domain. I've set up a CNAME to map the subdomain cdn.example.com to the URL where the CDN hosts my static content (images, CSS and JS files, and PDFs).

      www.example.com and cdn.example.com are now two different IP addresses.

      Internal links to my PDF files (white papers and articles) used to be www.example.com/downloads but now they are cdn.example.com/downloads

      The same PDF files can be accessed at both the www and the cdn. subdomain. Thus, external links to the www version will continue to work.

      Question 1: Should I set up 301 redirects in .htaccess such as:

      Redirect permanent /downloads/filename.pdf http://cdn.example.com/downloads/filename.pdf

      Question 2: Do I need to do anything else in my .htaccess file (or anywhere else) to ensure that any SEO benefit provided by the PDF files remains associated with my domain?

      Question 3: Am I better off keeping my PDF files on the www side and off of the CDN?

      Thanks,

      Akira

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

        How many PDF files are we talking ? Are they indexed ? Is there unique text content or images that have text that google has OCR'D ? If yes, I would suggest keeping them on www and therefore keep it simple. Again, it depends how many PDF files in number as well as their size in gigs would make it an easy answer.

        ahirai 1 Reply Last reply Reply Quote 1
        • ahirai
          ahirai @NakulGoyal last edited by

          There are about a dozen PDFs and they are indexed.

          I agree that it's probably better to play it safe and keep these files on www.

          Thanks!

          NakulGoyal 1 Reply Last reply Reply Quote 0
          • NakulGoyal
            NakulGoyal @ahirai last edited by

            Yup...keep it simple...where possible 🙂

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

              On your cdn, you have an option to disallow se's to index files on subdomains by robots.txt so you can keep a copy on cdn.example.com as well, and noindex it via robots.txt for better  user experience

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Heroku, Subdomains, redirecting to different servers & SEO
                Alternatively.marketing
                Alternatively.marketing
                0
                3
                76

              • Link to AMP VS AMP Google Cache VS Standard page?
                joramtenham
                joramtenham
                0
                2
                88

              • I have consolidated my subdomains into subfolders; should i remove the subdomains also?
                McCaldin
                McCaldin
                0
                5
                93

              • ATG & Endeca Integration & SEO implications
                0
                1
                803

              • Buying multiple domains: misspells & .net, org, etc. & 301's
                KevinBudzynski
                KevinBudzynski
                0
                4
                389

              • Subdomains
                irvingw
                irvingw
                0
                4
                255

              • Subdomains
                DanDeceuster
                DanDeceuster
                0
                2
                931

              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