How to change browser tab headers for website hosted on S3
I have a website through S3 with a Cloudfront distribution in front of it. The title of the tab for the website homepage has the domain title, but the title of every page just says "Document." How can I change this so that each page of my website shows the domain title in the browser tab title?
The title of the browser tab for any web page is determined by the following:
- If the web page contains a <title></title> tag pair, then the text between those tags will become the title of the browser tab.
- If the web page does not contain a <title></title> tag pair, then the default title kicks in, which is the domain name of the website.
If you are getting "Document" as the title of the browser tab, that means the web page specifically contains "Document" within the <title></title> tag pair, like: <title>Document</title>
You can view the HTML source of the web page to verify this.
In short, having a CloudFront distribution in no way changes the web page's title that appears in the browser tab. Hence, to have the domain name in the browser of any web page, ensure that the web page does not contain the <title></title> tag pair.
Relevant questions
OAI or not OAI for serving a static website in S3 using CloudFront
asked 2 months agoAdding Domain Name to CloudFront Distribution
Accepted Answerasked 5 months agoGetting strange error after attach Cloudfront to S3 website.
asked 3 years agoHow to change browser tab headers for website hosted on S3
asked a month agoS3 hosted website through Cloudfront - 302 (temporary redirect) response for objects
Accepted Answerasked 5 years agoRegistered domain with AWS, configured Route 53 and S3. URL taking me to wrong website.
asked 4 months agoStatic website in S3 not working with HTTPS
asked 2 years agoBest way to run a web scraper from my S3 website and save the returned information to a database
asked 2 months agoS3 Static Website RoutingRules when using Cloudfront and a domain name
asked 3 years ago"www" address of website
asked 3 years ago