Anyone use maxcdn?

Tempest

Active member
Has anyone here set up their xenForo forum to utilize maxcdn? I've had a go at it and so have my other staff members and we can't figure out why it's just not working. There's no integration plug-in for xenForo right now but it's a CDN, it shouldn't be hard to set up manually.

Edit: Okay so I've got the CNAMEs and what not right. A friend tells me I need to edit each .css file and the urls in it for the styles. What's left me confused is I have no idea exactly what to edit. I haven't got a clue with these files.
 
Here is what I have:

I've been using MaxCDN for a little over a year. I'm going to try and setup a new Pull Zone to see if that for some reason fixes it.
Replace the ’ quote with '
Code:
$config['externalDataUrl'] ='http://cdn.priuschat.com/data';
$config['javaScriptUrl'] = 'http://cdn.priuschat.com/js';
 
Here are the screenshots.
I don't know if you ever got it to work, but you definitely want to enable the robots.txt. If configured properly, this will prevent search bots from indexing your cdn CNAME as duplicate content on the subdomain. For example cdn.mydomain.* can easily become indexed and flagged as duped content.
 
Last edited:
I have this in my .htaccess:

Code:
        RewriteCond %{HTTP:VIA} ^.*\.worldcdn\..*$
        RewriteRule ^robots\.txt$ robots_cdn.txt [L]

which makes the bot fetch the custom robots_cdn.txt which is a disallow all

Code:
User-agent: *
Disallow: /
 
I have a $39.95 MaxCDN invoice due this week and am going to move off of it. Bandwidth isn't a concern and server load is never even close to 1 so the cost is prohibitive I think.
 
I am going to try and explain this the best I can, so here goes.

Once you create your MaxCDN.com account, you will need to log in and create your first pull zone. A pull zone will receive a request from a user and check to see if it is already cached. If not, it will hit your server, grab the asset and then cache it on the CDN server for later requests.

Go to Managed Zones -> Create Pull Zone.
  • Pull Zone Name: Whatever you want to identify you pull zone. For my site bolttalk, I used bolttalkstatic. The name is not really important so don't stress to much over this.
  • Origin Server: This is the BASE URL to your site. Again for bolttalk, I used http://bolttalk.com/. (include the http://; you can include the "www" in front if you want, I do not use the "www" for bolttalk)
  • Custom CDN Domain: Initially, I used cdn.bolttalk.com but I want to go with the cookie-less domain so I registered bolttalk.org and used static.bolttalk.org. You DO NOT have to register a separate domain, you can use cdn.YOUR_SITE.com.
  • Label: Again, this can be anything to help you identify the zone.
  • Compression: I would turn this on.
Click "Create".

Now go to the manage pull zones screen and you should see the zone that you just created. Click on that row or click on the "Manage" button to the right.

The next screen will show you where to point your sub-domain/domain to enable the CDN. You should see a temporary URL: bolttalkstatic.freeprollc.netdna-cdn.com (this is mine for bolttalk)

After you get that URL, you will need to create a CNAME on the domain that you are going to use. For bolttalk.com I had the bolttalk.org domain. I created a CNAME with a HOST value of "static" and a POINTS TO value of "bolttalkstatic.freeprollc.netdna-cdn.com". Save your domain setting or zone file.

Adding the CNAME is probably going to be the trickiest part for a number of non-tech savvy people. But if you can figure that out, then you are GOOD TO GO!

TEST YOUR CDN SETTINGS BEFORE EDITNG YOUR CONFIG.PHP OR STYLE PROPERTIES!

Basically get the URL of an image and type that into your browser:
http://bolttalk.com/data/attachments/2/2528-e718dc8a2755f32242f2c3b22feb6c60.jpg

And modify it manually to point to your CDN:
http://static.bolttalk.org/data/attachments/2/2528-e718dc8a2755f32242f2c3b22feb6c60.jpg

If the image work at BOTH urls, you can move on to the next step. Otherwise, recheck your settings or give it some more time to propagate. (propagation could take up to 48 hours depending on how you have your domain name setup with your host)

Next, you need to edit the config.php file that is located in the library directory. Simple edit the config file and add the following 2 lines:

$config['externalDataUrl'] = 'http://static.bolttalk.org/data';
$config['javaScriptUrl'] = 'http://static.bolttalk.org/js';

You will need to modify the above 2 lines to reference your OWN custom CDN URL, but you can see how I set it up for myself.

Finally, you will need to modify a value in the style vars:
Style Properties -> General -> Settings -> Path to Images:
http://static.bolttalk.org/styles/bolttalk

Again that is what I used, modify it to fit your needs.

Post a reply if you have any questions.

GOOD LUCK!

If i could find you, i would hug you. Thank you
 
@robdog Thanks a million for taking the time to post this guide, really appreciate it, I am sure a thousand other people appreciate it too. I think I might have missed some steps, I am able to create the entire thing if I use a sub-domain. But, my intention is to use an add-on domain to serve static content, the issue I faced was that Google was indexing the add-on domain as a mirror of the actual site.

I tried to find a solution but failed and I wonder how were you able to use .org for your static content, and not have it showing any website when entered directly in the browser? I need to block the second domain from displaying any website or available for google bots to index as duplicate content.

I hope you are still active here, I could use some help.
 
Last edited:
Top Bottom