Home > Amazon S3 > Mapping Amazon AWS S3 to a Custom Domain Name

Mapping Amazon AWS S3 to a Custom Domain Name

According to Amazon’s Developer Guide you can setup Virtual Hosting of your files by adding a CNAME in your DNS server. I’ve sinced mapped a subdomain s3.brangle.com to Amazon’s S3 cloud.

The way I did this was to create a CNAME entry on my DNS server mapping
s3.brangle.com to s3.brangle.com.s3.amazonaws.com.
and yes, that is a period at the end of s3.brangle.com.s3.amazonaws.com. Now just creating the CNAME entry only redirects users to Amazon S3, Amazon needs to know which bucket to use. The name of the bucket needs to be the fully qualified domain name (FQN) that you are using. So in my example, my bucket name is s3.brangle.com.

In general, if you want to create subdomain.domain.com then your bucket will have to be named subdomain.domain.com. I was under the impression that I could create s3.brangle.com and name the bucket whatever I wanted with a

According to Amazon Web Services

Customizing Amazon S3 URLs with CNAMEs

Depending on your needs, you might not want “s3.amazonaws.com” to appear on your web site or service. For example, if you host your web site’s images on Amazon S3, you might prefer http://images.johnsmith.net/ as opposed to http://johnsmith-images.s3.amazonaws.com/.

The bucket name must be the same as the CNAME. So http://images.johnsmith.net/filename would be the same as http://images.johnsmith.net.s3.amazonaws.com/filename if a CNAME were created to map images.johnsmith.net to images.johnsmith.net.s3.amazonaws.com.

Any bucket with a DNS compatible name may be referenced as follows: http://[BucketName].s3.amazonaws.com/[Filename], for example, http://images.johnsmith.net.s3.amazonaws.com/mydog.jpg. Using CNAME you can map images.johnsmith.net to an Amazon S3 host name so the previous URL could become: http://images.johnsmith.net/mydog.jpg.

The CNAME DNS record should alias your domain name to the appropriate virtual hosted style host name. For example, if your bucket name (and domain name) is images.johnsmith.net, the CNAME record should alias to images.johnsmith.net.s3.amazonaws.com.

**Edit 13 Dec 2011 – Updated AWS developer guide link

Categories: Amazon S3 Tags: , , ,
  1. August 27th, 2020 at 01:06 | #1

    I’ve been browsing online more than three hours today,
    yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my opinion, if all website
    owners and bloggers made good content as you did, the internet will be much more useful than ever before.

  1. November 8th, 2019 at 08:29 | #1
  2. March 27th, 2020 at 08:41 | #2
  3. April 19th, 2020 at 02:40 | #3
  4. April 22nd, 2020 at 09:02 | #4
  5. April 24th, 2020 at 11:59 | #5
  6. April 26th, 2020 at 05:25 | #6
  7. April 27th, 2020 at 09:06 | #7
  8. April 27th, 2020 at 17:08 | #8
  9. April 28th, 2020 at 00:59 | #9
  10. April 28th, 2020 at 19:47 | #10
  11. April 28th, 2020 at 19:53 | #11
  12. April 28th, 2020 at 20:03 | #12
  13. April 28th, 2020 at 20:29 | #13
  14. April 28th, 2020 at 20:30 | #14
  15. April 28th, 2020 at 20:32 | #15
  16. April 28th, 2020 at 20:38 | #16
  17. April 28th, 2020 at 21:05 | #17
  18. April 28th, 2020 at 21:07 | #18
  19. April 28th, 2020 at 21:09 | #19
  20. April 28th, 2020 at 21:12 | #20
  21. April 28th, 2020 at 21:26 | #21
  22. April 28th, 2020 at 21:41 | #22
  23. April 28th, 2020 at 21:53 | #23
  24. April 28th, 2020 at 21:56 | #24
  25. April 28th, 2020 at 22:00 | #25
  26. April 28th, 2020 at 22:32 | #26
  27. April 28th, 2020 at 22:58 | #27
  28. April 29th, 2020 at 02:08 | #28
  29. April 29th, 2020 at 02:14 | #29
  30. April 29th, 2020 at 03:04 | #30
  31. April 29th, 2020 at 12:28 | #31
  32. April 30th, 2020 at 10:29 | #32
  33. April 30th, 2020 at 13:05 | #33
  34. April 30th, 2020 at 15:12 | #34
  35. April 30th, 2020 at 19:29 | #35
  36. May 1st, 2020 at 04:25 | #36
  37. May 1st, 2020 at 05:21 | #37
  38. May 1st, 2020 at 11:00 | #38
  39. May 1st, 2020 at 12:07 | #39
  40. May 1st, 2020 at 15:03 | #40
  41. May 2nd, 2020 at 06:13 | #41
  42. May 2nd, 2020 at 14:11 | #42
  43. May 2nd, 2020 at 16:34 | #43
  44. May 2nd, 2020 at 16:55 | #44
  45. May 2nd, 2020 at 22:33 | #45
  46. May 3rd, 2020 at 04:46 | #46
  47. May 3rd, 2020 at 05:17 | #47
  48. May 3rd, 2020 at 14:56 | #48
  49. May 3rd, 2020 at 16:43 | #49
  50. May 3rd, 2020 at 18:03 | #50
  51. May 3rd, 2020 at 21:13 | #51
  52. May 6th, 2020 at 17:22 | #52
  53. May 6th, 2020 at 17:39 | #53
  54. May 8th, 2020 at 11:46 | #54
  55. May 10th, 2020 at 01:58 | #55
  56. May 10th, 2020 at 09:27 | #56
  57. May 12th, 2020 at 18:24 | #57
  58. May 13th, 2020 at 02:34 | #58
  59. May 13th, 2020 at 06:11 | #59
  60. May 13th, 2020 at 10:59 | #60
  61. May 13th, 2020 at 18:17 | #61
  62. May 13th, 2020 at 21:00 | #62
  63. May 14th, 2020 at 00:58 | #63
  64. May 14th, 2020 at 12:41 | #64
  65. May 14th, 2020 at 16:18 | #65
  66. May 16th, 2020 at 16:18 | #66
  67. May 16th, 2020 at 21:10 | #67
  68. May 16th, 2020 at 22:08 | #68
  69. May 17th, 2020 at 09:17 | #69
  70. May 17th, 2020 at 10:13 | #70
  71. May 17th, 2020 at 23:18 | #71
  72. May 19th, 2020 at 01:14 | #72
  73. May 19th, 2020 at 03:00 | #73
  74. May 19th, 2020 at 13:27 | #74
  75. May 19th, 2020 at 13:49 | #75
  76. May 20th, 2020 at 01:11 | #76
  77. May 21st, 2020 at 04:39 | #77
  78. May 21st, 2020 at 19:46 | #78
  79. May 23rd, 2020 at 13:17 | #79
  80. May 23rd, 2020 at 14:48 | #80
  81. May 25th, 2020 at 06:43 | #81
  82. May 25th, 2020 at 09:03 | #82
  83. May 26th, 2020 at 01:22 | #83
  84. May 26th, 2020 at 02:52 | #84
  85. May 27th, 2020 at 23:09 | #85
  86. May 28th, 2020 at 10:07 | #86
  87. May 31st, 2020 at 21:14 | #87
  88. June 1st, 2020 at 19:01 | #88
  89. June 2nd, 2020 at 17:27 | #89
  90. June 3rd, 2020 at 02:19 | #90
  91. June 4th, 2020 at 13:23 | #91
  92. June 4th, 2020 at 21:17 | #92
  93. June 5th, 2020 at 14:09 | #93
  94. June 5th, 2020 at 15:57 | #94
  95. June 7th, 2020 at 01:12 | #95
  96. June 8th, 2020 at 01:09 | #96
  97. June 8th, 2020 at 04:01 | #97
  98. June 9th, 2020 at 01:17 | #98
  99. June 9th, 2020 at 16:41 | #99
  100. June 11th, 2020 at 16:02 | #100
  101. June 12th, 2020 at 00:40 | #101
  102. June 12th, 2020 at 14:23 | #102
  103. June 12th, 2020 at 18:45 | #103
  104. June 14th, 2020 at 02:27 | #104
  105. June 14th, 2020 at 02:31 | #105
  106. June 14th, 2020 at 02:33 | #106
  107. June 14th, 2020 at 04:27 | #107
  108. June 14th, 2020 at 04:27 | #108
  109. June 14th, 2020 at 04:32 | #109
  110. June 14th, 2020 at 04:35 | #110
  111. June 14th, 2020 at 04:35 | #111
  112. June 14th, 2020 at 07:21 | #112
  113. June 14th, 2020 at 07:22 | #113
  114. June 14th, 2020 at 07:23 | #114
  115. June 14th, 2020 at 09:28 | #115
  116. June 14th, 2020 at 09:29 | #116
  117. June 14th, 2020 at 09:30 | #117
  118. June 14th, 2020 at 09:44 | #118
  119. June 14th, 2020 at 09:45 | #119
  120. June 14th, 2020 at 09:45 | #120
  121. June 14th, 2020 at 17:46 | #121
  122. June 14th, 2020 at 17:48 | #122
  123. June 14th, 2020 at 17:50 | #123
  124. June 14th, 2020 at 18:13 | #124
  125. June 14th, 2020 at 18:18 | #125
  126. June 14th, 2020 at 18:20 | #126
  127. June 14th, 2020 at 19:45 | #127
  128. June 14th, 2020 at 19:45 | #128
  129. June 14th, 2020 at 19:46 | #129
  130. June 14th, 2020 at 20:50 | #130
  131. June 14th, 2020 at 20:51 | #131
  132. June 14th, 2020 at 20:52 | #132
  133. June 14th, 2020 at 21:02 | #133
  134. June 14th, 2020 at 21:39 | #134
  135. June 14th, 2020 at 21:40 | #135
  136. June 14th, 2020 at 21:47 | #136
  137. June 16th, 2020 at 05:45 | #137
  138. June 16th, 2020 at 06:23 | #138
  139. June 17th, 2020 at 12:42 | #139
  140. June 19th, 2020 at 06:41 | #140
  141. June 19th, 2020 at 09:16 | #141
  142. June 19th, 2020 at 13:17 | #142
  143. June 19th, 2020 at 16:56 | #143
  144. June 19th, 2020 at 22:13 | #144
  145. June 20th, 2020 at 00:10 | #145
  146. June 20th, 2020 at 03:17 | #146
  147. June 20th, 2020 at 09:59 | #147
  148. June 20th, 2020 at 16:38 | #148
  149. June 20th, 2020 at 17:18 | #149
  150. June 21st, 2020 at 04:52 | #150
  151. June 21st, 2020 at 19:37 | #151
  152. June 21st, 2020 at 23:09 | #152
  153. June 21st, 2020 at 23:59 | #153
  154. June 22nd, 2020 at 02:56 | #154
  155. June 22nd, 2020 at 13:06 | #155
  156. June 23rd, 2020 at 05:03 | #156
  157. June 23rd, 2020 at 10:48 | #157
  158. June 24th, 2020 at 00:17 | #158
  159. June 24th, 2020 at 01:23 | #159
  160. June 24th, 2020 at 09:22 | #160
  161. June 24th, 2020 at 10:42 | #161
  162. June 24th, 2020 at 13:38 | #162
  163. June 24th, 2020 at 23:26 | #163
  164. June 25th, 2020 at 00:34 | #164
  165. June 25th, 2020 at 03:35 | #165
  166. June 25th, 2020 at 04:31 | #166
  167. June 25th, 2020 at 06:39 | #167
  168. June 25th, 2020 at 11:51 | #168
  169. June 25th, 2020 at 14:57 | #169
  170. June 25th, 2020 at 19:03 | #170
  171. June 25th, 2020 at 21:31 | #171
  172. June 26th, 2020 at 02:12 | #172
  173. June 26th, 2020 at 03:27 | #173
  174. June 26th, 2020 at 08:44 | #174
  175. June 28th, 2020 at 03:10 | #175
  176. June 28th, 2020 at 06:38 | #176
  177. June 28th, 2020 at 09:34 | #177
  178. June 28th, 2020 at 11:46 | #178
  179. June 28th, 2020 at 20:14 | #179
  180. June 29th, 2020 at 03:03 | #180
  181. June 29th, 2020 at 11:25 | #181
  182. June 29th, 2020 at 14:40 | #182
  183. June 30th, 2020 at 01:12 | #183
  184. June 30th, 2020 at 06:21 | #184
  185. June 30th, 2020 at 15:22 | #185
  186. July 1st, 2020 at 19:11 | #186
  187. July 2nd, 2020 at 17:19 | #187
  188. July 3rd, 2020 at 10:25 | #188
  189. July 4th, 2020 at 03:44 | #189
  190. July 4th, 2020 at 10:01 | #190
  191. July 4th, 2020 at 13:14 | #191
  192. July 4th, 2020 at 17:08 | #192
  193. July 5th, 2020 at 07:31 | #193
  194. July 5th, 2020 at 17:48 | #194
  195. July 5th, 2020 at 23:19 | #195
  196. July 6th, 2020 at 06:50 | #196
  197. July 6th, 2020 at 10:22 | #197
  198. July 7th, 2020 at 01:16 | #198
  199. July 7th, 2020 at 08:25 | #199
  200. July 7th, 2020 at 15:43 | #200
  201. July 7th, 2020 at 21:28 | #201
  202. July 9th, 2020 at 14:23 | #202
  203. July 13th, 2020 at 00:55 | #203
  204. July 13th, 2020 at 02:10 | #204
  205. July 14th, 2020 at 00:48 | #205
  206. July 14th, 2020 at 06:21 | #206
  207. July 14th, 2020 at 06:23 | #207
  208. July 14th, 2020 at 06:49 | #208
  209. July 14th, 2020 at 07:32 | #209
  210. July 14th, 2020 at 08:01 | #210
  211. July 14th, 2020 at 21:01 | #211
  212. July 15th, 2020 at 01:20 | #212
  213. July 15th, 2020 at 10:20 | #213
  214. July 15th, 2020 at 10:38 | #214
  215. July 15th, 2020 at 10:56 | #215
  216. July 15th, 2020 at 10:59 | #216
  217. July 15th, 2020 at 17:43 | #217
  218. July 15th, 2020 at 22:06 | #218
  219. July 15th, 2020 at 22:10 | #219
  220. July 15th, 2020 at 22:54 | #220
  221. July 15th, 2020 at 23:48 | #221
  222. July 16th, 2020 at 00:23 | #222
  223. July 16th, 2020 at 11:03 | #223
  224. July 16th, 2020 at 12:22 | #224
  225. July 16th, 2020 at 19:40 | #225
  226. July 17th, 2020 at 00:50 | #226
  227. July 17th, 2020 at 02:11 | #227
  228. July 17th, 2020 at 02:14 | #228
  229. July 17th, 2020 at 04:03 | #229
  230. July 17th, 2020 at 05:29 | #230
  231. July 17th, 2020 at 06:54 | #231
  232. July 17th, 2020 at 06:55 | #232
  233. July 17th, 2020 at 07:49 | #233
  234. July 17th, 2020 at 12:16 | #234
  235. July 17th, 2020 at 17:51 | #235
  236. July 17th, 2020 at 22:11 | #236
  237. July 18th, 2020 at 02:09 | #237
  238. July 18th, 2020 at 02:17 | #238
  239. July 18th, 2020 at 07:22 | #239
  240. July 18th, 2020 at 07:32 | #240
  241. July 18th, 2020 at 07:37 | #241
  242. July 18th, 2020 at 11:28 | #242
  243. July 19th, 2020 at 05:02 | #243
  244. July 19th, 2020 at 13:07 | #244
  245. July 20th, 2020 at 18:43 | #245
  246. July 23rd, 2020 at 17:21 | #246
  247. July 24th, 2020 at 01:25 | #247
  248. July 26th, 2020 at 00:22 | #248
  249. July 26th, 2020 at 00:31 | #249
  250. July 26th, 2020 at 00:40 | #250
  251. July 26th, 2020 at 00:43 | #251
  252. July 26th, 2020 at 00:46 | #252
  253. July 26th, 2020 at 00:47 | #253
  254. July 26th, 2020 at 00:48 | #254
  255. July 26th, 2020 at 00:52 | #255
  256. July 26th, 2020 at 02:09 | #256
  257. July 26th, 2020 at 02:20 | #257
  258. July 26th, 2020 at 06:32 | #258
  259. July 26th, 2020 at 14:23 | #259
  260. July 26th, 2020 at 23:08 | #260
  261. July 27th, 2020 at 10:10 | #261
  262. July 28th, 2020 at 09:12 | #262
  263. July 28th, 2020 at 10:39 | #263
  264. July 28th, 2020 at 14:17 | #264
  265. July 28th, 2020 at 16:16 | #265
  266. July 29th, 2020 at 00:07 | #266
  267. July 29th, 2020 at 00:25 | #267
  268. July 29th, 2020 at 10:56 | #268
  269. July 31st, 2020 at 07:14 | #269
  270. July 31st, 2020 at 14:46 | #270
  271. July 31st, 2020 at 19:50 | #271
  272. August 1st, 2020 at 01:21 | #272
  273. August 1st, 2020 at 04:03 | #273
  274. August 1st, 2020 at 04:14 | #274
  275. August 1st, 2020 at 06:40 | #275
  276. August 1st, 2020 at 08:49 | #276
  277. August 1st, 2020 at 09:36 | #277
  278. August 1st, 2020 at 15:33 | #278
  279. August 2nd, 2020 at 09:57 | #279
  280. August 2nd, 2020 at 13:39 | #280
  281. August 2nd, 2020 at 17:15 | #281
  282. August 3rd, 2020 at 15:17 | #282
  283. August 4th, 2020 at 11:34 | #283
  284. August 6th, 2020 at 04:06 | #284
  285. August 6th, 2020 at 14:12 | #285
  286. August 7th, 2020 at 03:02 | #286
  287. August 7th, 2020 at 04:24 | #287
  288. August 7th, 2020 at 06:09 | #288
  289. August 7th, 2020 at 06:18 | #289
  290. August 7th, 2020 at 17:04 | #290
  291. August 8th, 2020 at 03:39 | #291
  292. August 8th, 2020 at 06:16 | #292
  293. August 8th, 2020 at 06:19 | #293
  294. August 8th, 2020 at 17:38 | #294
  295. August 8th, 2020 at 21:25 | #295
  296. August 9th, 2020 at 00:44 | #296
  297. August 15th, 2020 at 18:17 | #297
  298. August 16th, 2020 at 14:13 | #298
  299. August 21st, 2020 at 02:21 | #299
  300. August 22nd, 2020 at 05:18 | #300
  301. August 29th, 2020 at 08:52 | #301
  302. September 4th, 2020 at 07:35 | #302
  303. September 12th, 2020 at 01:38 | #303
  304. September 15th, 2020 at 15:03 | #304
  305. September 25th, 2020 at 03:00 | #305
  306. October 5th, 2020 at 01:51 | #306
  307. October 5th, 2020 at 16:01 | #307
  308. October 6th, 2020 at 13:25 | #308
  309. October 19th, 2020 at 05:06 | #309