Static website note showing up on google cloud platform - google-cloud-platform

I have followed the instructions given on https://cloud.google.com/storage/docs/hosting-static-website, yet my domain name still lands on the page with this error:
This site can’t be reached
afrikincm.com’s server IP address could not be found.
Search Google for afrikincm
ERR_NAME_NOT_RESOLVED
My doamin registrar is goDaddy.com and all i did there was:
see godaddy dashboard
All objects added to my bucket on Google Cloud Platform have been made public yet something still doesn't seem to be working right.
I really will appreciate some help here guys.
Thanks

It seems that something is wrong and somewhere down the line and the DNS record is not resolving to the content of your gcs bucket.
First of all, be sure that the bucket name is exactly the value that you are specifying as CNAME.
Then review and re-take the steps suggested in the documentation.
Make sure that billing is enabled
Verify that you own and manage the domain that you'll be using: webmaster central
Create a CNAME record that points to c.storage.googleapis.com
Create a bucket whose name matches the CNAME you created for your domain
put files in your bucket (like an index.html)
make all object public with gsutil iam ch allUsers:objectViewer gs://[BUCKET_NAME]
setup index + error page with: gsutil web set -m index.html -e 404.html gs://[BUCKET_NAME]
Judging from the error, it seems that something is wrong with the godaddy records or the bucket name or the verification step :)

Related

Domain in Google Domains and Code in Amazon S3

Before you read the rest I am an absolute beginner at deploying website and the end goal would be:
My website I want to load is
site.s3-website.us-east-2.amazonaws.com
and I want all the content to be put on
mydomain.com
So when you visit mydomain.com you see see all the content that is supposed to be on the AWS S3 Site.
I have followed many articles and posts, however I don't seem to be getting the expected results or they seem to be outdated.
The best way is to migrate to route 53.
However, you can set up a redirect or simply set up an CNAME record that resolves to S3 Static website URL.
The last step is to Forward domain to your naked domain name "example.com" to "www.example.com
NOTE: You could just Forward to your bucket using the complete bucket URL with "name masking", however most web crawlers will not see your complete site if you do it that way and web searches will fail.
Hope this helps!
The S3 bucket name must be the same as the domain name, so your bucket should be called mydomain.com. Then just add a cname in your DNS to resolve to mydomain.com.s3-website.us-east-2.amazonaws.com

AWS Route 53 redirection does not work as expected

We want to redirect our oldwebsite.com to newwebsite.com and both of the domains are managed in AWS Route53. The developer who set this up originally is not reachable.
I created an S3 bucket for oldwebsite.com and set it to redirect to newwebsite.com over http. Then on the Route53 hosted zone of oldwebsite.com, I chose the S3 bucket I created as an Alias name for the Type 'A' record set.
Our oldwebsite.com is down. I am pretty sure I have set the right values, but the oldwebsite.com still shows one of those "there is no website here, buy this website" type pages.
Further more, if I type www.oldwebsite.com, then that page opens, but if I type simply oldwebsite.com, it opens a 404 page not found on Hostgator.
Any help on where to check would be appreciated.

Amazon web hosting URL not changing

Just hosted a website on amazon aws in a s3 bucket. When I move around in the website the URL doesn't change, even if the link redirect on a page with a different path.
I read around that it has something to do with iframes, even though I'm not sure what they are.
Regardless, I'm just wondering whether it's possible with the aws s3 to make so that by moving around in the website, the URL gets updated as well.
For testing purposes, this is the link to the website, and to go to another part of the website, just scroll down and click on the website image.
Thank you!
I've manage to find out how to connect the web hosting s3 bucket to the freenom free domain provider.
The s3 bucket needs to have the same name as your domain + the "www". In my example my domain was paolo-caponeri.ga, the bucket needs to be www.paolo-caponeri.ga
Then in the freenom domains manager you need to go the name servers section, select the "Use default nameservers" and then press "save"
Finally you need to go to the freenom DNS manager and add a new CNAME record with "www" on the left and the full link to the s3 bucket provided in the amazon s3 properties on the right; in my case it was "www.paolo-caponeri.ga.s3-website.eu-central-1.amazonaws.com"
And that's it, after a while you should be able to connect to your website without having the URL being masked.
(thank you to Frederic Henri, who got me much closer to the answer!)
NB: I have no experience with freenom so those are more advices than a proven solution.
It seems freenom is doing frame forwarding and you would need instead a "A" / "CNAME" referral.
Your site runs fine if you go to http://testpages.paolo.com.s3-website.eu-central-1.amazonaws.com/ and as such bypass the freenom redirection.
A quick search on freenom seems it could be possible: https://my.freenom.com/knowledgebase.php?action=displayarticle&id=4

Amazon Web Services Route 53 / S3 unable to point to my registered domain

This is another problem I am having, here is the info.
My endpoint for the first bucket works, but not the 2nd bucket, and using my domain name in the browser just doesn't work at all.
Once again I have taken screenshots, this is driving me insane, I have no idea how to correct it, it just doesn't find my root or something.
Record Sets
Buckets
I can't post more than 2 links
If anyone can help me, even PM me, I'll give my login details to take a look, because I'm completely stumped.
You should follow the directions on Setting Up a Static Website Using a Custom Domain.
For the first bucket, the steps are:
Create an Amazon S3 bucket with the same name as your domain (justdiditonlne.com)
Add a bucket policy to make the content public, or modify desired objects to make them publicly accessible
Turn on Static Website Hosting, and you will receive a URL like: justdiditonline.com.s3.amazonaws.com
Create a Route 53 entry for justdiditonline.com, type A, set Alias=Yes and enter the static website hosting URL
For the second bucket:
Create an Amazon S3 Bucket with the desired domain name (www.justdiditonline.com)
Turn on Static Website Hosting, but this time select Redirect all requests to another host name. Enter www.justdiditonline.com.

Custom Domain for S3 Files

This should be easy as there is no shortage of pages on custom domains and S3 but for some reason I can't seem to get it to work as expected.
I have a S3 Bucket full of videos. The S3 bucket is called for example "videos.foo.com". I bought the domain "videos.foo.com" and set it up in cloudflare with the cname "videos.foo.com" pointing to "videos.foo.com.s3-website-us-east-1.amazonaws.com".
I can view files in my bucket by going to there full url such as "videos.foo.com.s3-website-us-east-1.amazonaws.com/myvideo.mpg".
My problem is I can't view them by going to "videos.foo.com/myvideo.mpg".
I tried enabling "Redirect all requests to another host name" and entering "videos.foo.com" but that didn't work either. To note, I will 'not' be hosting a site at "videos.foo.com" just serving files.
All the files have permissions everyone: open/download.
If anything sees the error in my ways please let me know. In the mean time I'll keep searching and going through trial and error. Thanks!
Nginx S3 proxy helps to solve that problem, please check more details: https://stackoverflow.com/a/44749584/290338
A bucket can be named differently, the only performance rule is to have EC2 and a bucket in the same geo location.
You may need to configure the Route 53 record as an alias rather than a cname. In R53, edit your record set and configure it like this -
Type: A - IPv4 address
Alias: Yes
When you click in the Alias Target textbox it will drop down a list that contains your S3 bucket (if it's properly configured). It can take a while to load that list so be patient. Select your bucket and hit save.
Check out this document for more info - http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html