Subdomains & CDNs
-
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
-
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
-
Yup...keep it simple...where possible
-
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!
-
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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Webpages & Images Index Graph Gone Down Badly in Google Search Console Why?
Hello All, What is going on with Sitemap Index Status in Google Search Console :- Webpages Submitted - 35000 index showing 21000 whereas previously approx 34500 were index. Images Submitted - 85000 index showing - 11000 whereas previously approx 80000 were index. Whereas when I search in google site:abcd.com is it showing approx 27000 index for webpages. No message from google for penalty or warning etc.Please help.
Technical SEO | | wright3350 -
Subdomain as News Section instead of Source in Google News?
Hi, trying to dig into Google News for a large site, mostly containing news.
Technical SEO | | m.m
The structure of the site network is subdomain.domain.se, and each subdomain has it's own brand with it's own news: x.domain.se
y.domain.se
z.domain.se
etc... Each brand/subdomain is more or less to equate with its own subjectfield/section. In Google News every subdomain is configured with it's own Site Source url, but also having the set up with one section with the same url. It seems like they're getting conflicts in Google News, Google can't always figure out which news article to which brand. Example: an article owned by brand A, but it is sometimes happens that articles getting labeled as brand B in the news SERP, though the link takes you correctly to brand A. I am thinking that this config in News Publisher Center may be a problem? Anyone having any thoughts if that would be better if we delete all source urls except for domain.se-brand and then put all the other subdomains as sections? www.domain.se x.domain.se y.doamin.se z.domain.se Any smart thoughts on this one? Or anything else that could make this wrong labeling (all content included images are hosted in same domain for example). Regards,
Magnus0 -
Single Page for video & text resources or multiple?
Our new site will have a 'learning center' which contains educational videos as well as articles for prospects who are considering purchase. We were thinking linking to the "Learning center" page from main menu then having multiple videos and articles on this page. (thumbnails, & brief descriptions). Then when the user clicks on the video or article this will take them to a page with that video or article. My thoughts are that would allow us to optimize each page for that question or video topic. Is this a good idea? or should we just have video thumbnails on one page and have the video play on that same page? What about articles, should they also expand on that page or should they open on separate page? We are using WP as CMS. If the videos open on separate pages then how does the user easily get the other videos? will they have to go back to the /learning page or something else? It would seem like a lot of work to have them keep going back to watch one video, then go back and watch the next. What is the best practice - if there is one? Examples of websites that do this well?
Technical SEO | | PhotographerSteve1 -
Odd scenario: subdomain not indexed nor cached, reason?
hi all hopefully somebody can help me with this issue 🙂 6 months ago a number of pages hosted at a domain level have been moved to a subdomain level with 301redirects + some others were created from scratch ( at a subdomain level too). what happens is that not only the new urls at the subdomain level are not indexed nor cached, but the old urls are still indexed in google, although by clicking on them they bring to the new urls via 301 redirect. question is why having a 301 redirects to the new urls, no issues with robot.txt, metarobots etc, the new urls are still de-indexed? i might remind you that a few (100 pages or so) have been created from scratch, but they are also not indexed. the only issue found across the page is the no-cache line of code set as follow: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache i am not familiar with cache control lines. Can this be an issue from a correct indexing? thanks in advance Dario
Technical SEO | | Mrlocicero0 -
Ranking for Synonymous Terms (ie. lawyer & attorney)
To accomplish ranking for synonymous search terms, are we better off just letting Google make the connection? Should we put the secondary synonymous term in our page titles? Is it best practice to create a completely unique landing page for the term? Not sure how to go about this. Some examples would be "miami lawyer" or "miami attorney", "obgyn" vs "gynecologist" etc. Any help on this would be much appreciated!
Technical SEO | | RickyShockley1 -
Rankings of Subdomains vs. Main Domain
Here's a puzzler... Our main domain (www.ides.com) doesn't appear in Google (but does on Bing and other engines). We think this is due to duplicate content which we're fixing. However our website's subdomains continue to appear prominently in SERPs, even on Google - here are some examples: IDES Prospector = prospector.ides.com IDES = support.ides.com Cycolac FR15 = catalog.ides.com Why would Google penalize a main domain and its subdomains?
Technical SEO | | Prospector-Plastics0 -
Image search and CDNs
Hi, Our site has a very high domain strength. Although our site ranks well for general search phrases, we rank poorly for image search (even though our site has very high quality images). Our images are hosted on a separate CDN with a different domain. Although there are a number of benefits to doing this, since they are on a different domain, are we not able to capitalize on our my site's domain strength? Is there any way to associate our CDN to our main site via Google webmaster tools? Has anyone researched the search ranking impacts due to storing your images on a CDN, given that your domain strength is very high? Curious on people's thoughts?
Technical SEO | | NicB10 -
Thoughts about stub pages - 200 & noindex ok, or 404?
With large database/template driven websites it is often possible to get a lot of pages with no content on them. What are the current thoughts regarding these pages with no content, options; Return a 200 header code with noindex meta tag Return a 404 page & header code Something else? Thanks
Technical SEO | | slingshot0