Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
11

I'm still shocked to read that people assume that Content Delivery Networks are expensive, most charge as little as 0.20c per a GB. Serving static websites on CDNs is amazing - you get the performance of a dedicated server without actually paying for it, plus you have a server in all major regions around the world so effective its actually better than a ...


7

I have decided to serve only gzipped version of my pages If you're only serving files that you've compressed using gzip, then using Vary: Accept-Encoding will be of no benefit since there won't be uncompressed copies of the files to serve to clients that don't send Accept-Encoding: gzip in the HTTP request. Most clients these days do send this, so you ...


6

So is there a way in S3 to set a dynamic Expires that is always one year from the request date? Not that I know of, and I doubt that dedicated support for this will be considered by the AWS team: You are probably aware that one can't set a dynamic Expires: ... value as such because The only value valid in an Expires header is a HTTP date; anything else ...


6

Why do you want to serve those static assets with a gz extension at all? Despite being the common indicator for ages, file extensions are actually an inferior and inaccurate mechanism to communicate a MIME type in the first place: ideally, web resources should be entirely agnostic to file extensions and only communicate their content by means of appropriate ...


5

Amazon IAM ( http://aws.amazon.com/iam/ ) service gives you the ability to create accounts for students with separate password/credentials and with access to only specified AWS resources. You can create one account for all students there, or create a group called "Students" and assign all your students to that group. After doing that you need to specify an ...


4

Sorry but no, you can't. WordPress is entirely scripted in PHP. If you host a copy of a WordPress installation on a S3 bucket you will be lacking the PHP interpreter and the mySQL engine. The whole deal with EC2 is having a virtual machine so you can run services like a mysql server or a php instance. Anyway, with some elbow grease you could host a static ...


3

Firstly, make sure you are only linking to one version of the URL, whether it is /blog/ or /blog/index.html (I'd prefer the former since it's shorter and simpler). The best solution with regards to SEO would be to use a canonical tag. Put this inside the <head> tag: <link rel="canonical" href="http://yoursite.com/blog/"> That means that when ...


3

Should you be using Amazon S3 or CloudFront? CloudFront is the CDN that accelerates the delivery of static assets.


3

The S3 server could be farther away from you and so it takes longer for the bytes to travel to you. Using Cloudfront or another CDN puts your content on very fast servers all across the world which will increase the speed not just for you, but for users all over no matter where they are located. Cloudfront also supports compression all though you have to ...


3

A common way that CDN services work is whats known as origin based. What this means is you can have a secret. folder were all the content you want the cdn to be looking for is help. You allow users to upload to this folder normally and when in your code you give a URL like. cdn.example.com/images/my.png the cdn service will look at your site and download a ...


3

S3 web site hosting is strictly for static content. Nothing stored in S3 is executable by S3, such as PHP scripts. This is by design, and not a configuration issue with your site. You can host a static website on Amazon S3. On a static website, individual web pages include static content. They may also contain client-side scripts. By contrast, a ...


3

You may be misunderstanding the concept, here. Files on S3 cannot be modified, but they can be overwritten, and overwriting a file does not require deleting the old file, first. You simply upload a new file with the same name. The old file does not go away unless and until the new upload is complete and successful. A failed or partial overwrite of an ...


3

It turned out that HSTS headers were being served by the previous hosting. HSTS set all HTTP requests to example.ca to be internally redirected to HTTPS before being sent. Because custom domain HTTPS was not yet configured for the S3 bucket, the HTTPS request was timing out. Note that S3 does not support custom domain HTTPS directly, only through ...


2

Or does it work a different way like the images are still uploaded to my server but then I have to move them to the amazon server either manually or through a CRON job? Basically can someone explain to me how it works? Amazon's CloudFront supports "origin-pull" (via "custom origin"), where you tell it to look at your site for the files if it doesn't have a ...


2

Moving images from one host to another isn't enough. First are your images compressed and optimized? Second you should be using a CDN as well as s3 together not just serving static content from s3. The CDN's will cache the static content coming from s3 and serve that to your visitors quicker than s3 would.


2

S3 isn't meant to be the ONLY tool from AWS for static website hosting. The recommended approach is to put CloudFront in front of the S3 instance so that CloudFront can handle caching. I believe this will also eliminate your issue with paying a bunch for an increase of traffic since CloudFront will use it's cache to serve the files and not hit S3. Of course, ...


2

The problem is in the "pay as you go" part. If you get tons of traffic (ie: a DOS attack or a very popular blog post or file) you will PAY for it. AFAIK there isn't still a feature to put a cap to what you pay. You can set billing alerts, but if your billing reaches your maximum budget the only option you have is to shut the site down or you will pay for ...


2

While I cannot find any documented page on AWS documentation to confirm this, from personal experience I can verify that unfortunately it is not currently possible to pay Amazon Web Services in GBP (£), or any currency other than USD ($) for that matter. I'm also a UK-based AWS customer and can confirm that in addition to the exchange rate, the UK banks (e....


2

You need a credit card, but as long as you don't use it "too much" you should be within the Free usage tier. You get 5GB, of storage, 2,000 PUT requests, 20,000 GET requests.


2

Amazon has instructions for deploying WordPress on Elastic Beanstalk. The part that will prevent your problem is the section "Enable WordPress to Store Assets in Amazon S3". You have to install the "W3 Total Cache" plugin in WordPress and configure it to use "Amazon Simple Storage Service S3". When you have done that, plugins and themes will no longer ...


2

I have just checked with several DNS lookup tools that the address is not tampered with in China. I have even loaded the website using a Chinese proxy. Again, all is normal. I suspect that the client simply has some adware infection. If there is some proxying going on, it's a small affair, one ISP at most.


1

The reason you see a 301 in your curl is because www.mydomain.com redirects to mydomain.com from the S3 endpoint for www.mydomain.com. This is a common configuration when using S3 for your static website. The question is how do you have mydomain.com configured in your DNS zone at Namecheap? If the browser is displaying the S3 url I can only assume that the ...


1

Google should only return image results under Google image search. So if you search for site:example.com and click on the image search afterwards, it should just return your results. Google will index whatever is embedded in the page regardless of whether you're using a CDN or not, and so 'View Image' will display it on the CDN while 'Visit Page' will ...


1

(Answer By @Frank) You can enabble logging on the bucket and then use the API to figure out what is going on. You can also access your live usage figures in your AWS Account Console. http://docs.aws.amazon.com/AmazonS3/latest/UG/ManagingBucketLogging.html


1

According to the Billing FAQ, it is now possible to choose a non-USD currency for your AWS account: Q: Which currencies can I choose from? AUD – Australian Dollar CHF – Swiss Franc DKK – Danish Krone EUR – Euro GBP – British Pound HKD – Hong Kong Dollar JPY – Japanese Yen NOK – Norwegian Krone NZD – New Zealand ...


1

I have no clue if this is going to work well, but neither have I if it's about AngularJS and SEO in general. There is very little evidence it works the way it is supposed to do. I would suggest leaving PhantomJS in the dark, it is known to have issues and is not very lightweight. Also considering you don't want to write/set up a backend I would use Firefox ...


1

Facebook uses the facebookexternalhit user agent facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" Google+ uses a user agent containing "Google" Google (+https://developers.google.com/+/web/snippet/) You should grant them access by user agent.


1

Content Delivery Networks Most good content delivery networks will have a vast network of servers in various locations in US, EUROPE and ASIA. While you care little about US and ASIA its not relevant that your files will be cloned on these networks as most CDN's the price includes all these networks within the set profit margins and therefor will not cost ...


1

I'd recommend using youtube as the video hoster, as they have a good system inplace. That being said, have you had a look at these


1

It's actually a bit overpriced in terms of bandwidth. They also had, until very recently, an issue were you couldn't map both your @ and your www A record to your site (so you either had mydomain.com accessible, or www.mydomain.com accessible). This however was fixed in a very recent update. Personally, I think they're a bit overpriced, and you are lacking ...


Only top voted, non community-wiki answers of a minimum length are eligible