- Newest
- Most votes
- Most comments
When you change your domain name, you need to update several settings in AWS to ensure your S3 images work with your new domain. Here's what you need to do:
1. Check your WordPress settings: First, verify that your WordPress site is referencing the correct image URLs. You may need to update references to images in your WordPress database to point to the new domain or the correct S3 path.
2. Review your S3 bucket configuration: If your S3 bucket was named after your old domain (which is common for static website hosting), you might need to create a new bucket with your new domain name. S3 bucket names must exactly match the domain name for certain website hosting features to work.
3. Update bucket permissions: Make sure your S3 bucket permissions allow access from your new domain. You may need to modify the bucket policy to allow the new domain to access your images.
4. Configure CORS (Cross-Origin Resource Sharing): If your images aren't loading, it might be due to CORS restrictions. Update the CORS configuration in your S3 bucket to allow requests from your new domain.
5. If you're using CloudFront: If your S3 bucket is connected to CloudFront for content delivery, you'll need to update the CloudFront distribution settings to work with your new domain. This includes adding your new domain as an alternate domain name and possibly updating the SSL certificate.
6. Consider setting up a redirect: You can configure your old S3 bucket to redirect requests to your new domain by setting up website redirect rules in the bucket properties.
Since you mentioned you're not familiar with AWS, it might be helpful to engage with an AWS professional or web developer who can assist with these technical changes to ensure everything is properly configured.
Sources
setting up an S3 bucket with https | AWS re:Post
Need Help in connecting S3 bucket with cloudfront | AWS re:Post
Cannot link domain to hosting bucket in S3 | AWS re:Post
Host a Amazon S3 static website for redirect requests | AWS re:Post
You’re on the right track already with updating your domain and DNS. Now, for your S3 images to load correctly with the new domain, here are beginner-level steps to relink them:
Step 1: Check S3 Bucket Permissions Make sure your S3 bucket is publicly accessible (or properly configured for website use):
Go to your AWS S3 console
Click your image bucket
Under Permissions → Bucket Policy, check if it allows public access (or CloudFront if used)
Step 2: Update the Image URLs Your old domain probably linked to images using the previous URL format, like:
arduino Copy Edit https://old-domain.com/wp-content/uploads/... But if the images were stored directly in S3, the format would look like:
bash Copy Edit https://your-bucket-name.s3.amazonaws.com/image.jpg You’ll need to update the links in WordPress to reflect either:
The S3 direct URL, or
A new custom domain if you’re using CloudFront
Step 3: Use a Plugin (Optional, Easy) To simplify, you can install a plugin like:
WP Offload Media Lite It helps automatically rewrite and serve your media files from your S3 bucket, mapped to the correct domain.
Step 4: (Optional) Use CloudFront for Custom Domains If your S3 bucket is tied to a custom domain (e.g. cdn.yournewdomain.com), you’ll need to:
Set up a CloudFront distribution
Link it to your S3 bucket
Point a CNAME in GoDaddy to CloudFront
If you inherited the site, I’d also recommend:
Reviewing the S3 bucket name in WordPress settings (media plugin or custom code)
Checking the Media Library for broken image paths
Looking under wp-config.php or functions.php for any hardcoded URLs
Let me know if you'd like a walk-through on CloudFront or image link updating! You got this.
