Google showing dynamic page title set by JavaScript rather than the static title embedded in the HTML
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty{ margin-bottom:0;
}
up vote
2
down vote
favorite
On my website the title is initially set through the title tag in the html served by my server. It is then changed to its dynamic equivalent through JavaScript.
I want Google to show my website's title as the static one in the HTML, but for some reason, Google is listing the title set by JavaScript.
This issue has plagued me for a long time and I'm still without a solution.
seo html javascript title
New contributor
add a comment |
up vote
2
down vote
favorite
On my website the title is initially set through the title tag in the html served by my server. It is then changed to its dynamic equivalent through JavaScript.
I want Google to show my website's title as the static one in the HTML, but for some reason, Google is listing the title set by JavaScript.
This issue has plagued me for a long time and I'm still without a solution.
seo html javascript title
New contributor
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
On my website the title is initially set through the title tag in the html served by my server. It is then changed to its dynamic equivalent through JavaScript.
I want Google to show my website's title as the static one in the HTML, but for some reason, Google is listing the title set by JavaScript.
This issue has plagued me for a long time and I'm still without a solution.
seo html javascript title
New contributor
On my website the title is initially set through the title tag in the html served by my server. It is then changed to its dynamic equivalent through JavaScript.
I want Google to show my website's title as the static one in the HTML, but for some reason, Google is listing the title set by JavaScript.
This issue has plagued me for a long time and I'm still without a solution.
seo html javascript title
seo html javascript title
New contributor
New contributor
edited 3 hours ago
Stephen Ostermiller♦
66.3k1390239
66.3k1390239
New contributor
asked 6 hours ago
WillBDev
111
111
New contributor
New contributor
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
1
down vote
It sounds like all you need is a simple JavaScript "if" statement added to your code to keep it from changing the title on whatever page.
New contributor
add a comment |
up vote
1
down vote
The only solution that will not hurt your SEO is to prevent your JavaScript from changing the page title for that particular page (perhaps with an if
statement as Warren mentioned).
A good rule of thumb (and the rules for many search engines including Google) is to always show the search engine the exact same thing you show the user. If you don't want it indexed in the search engine that way, simply don't show it to the user that way.
add a comment |
up vote
0
down vote
What you are doing is a form of cloaking. It is against Google's Webmaster guidelines to show users one text and the search engine a different text. You need to set your titles such that the same title is seen by both users and Googlebot. If you show Googlebot different content, Google is likely to penalize your entire site such that it doesn't show up in the search results.
The reason that Google is picking up the dynamic title is that Googlebot is now able to execute the JavaScript. The fix should be to use the same title for both users and bots.
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
It sounds like all you need is a simple JavaScript "if" statement added to your code to keep it from changing the title on whatever page.
New contributor
add a comment |
up vote
1
down vote
It sounds like all you need is a simple JavaScript "if" statement added to your code to keep it from changing the title on whatever page.
New contributor
add a comment |
up vote
1
down vote
up vote
1
down vote
It sounds like all you need is a simple JavaScript "if" statement added to your code to keep it from changing the title on whatever page.
New contributor
It sounds like all you need is a simple JavaScript "if" statement added to your code to keep it from changing the title on whatever page.
New contributor
New contributor
answered 49 mins ago
WarrenH
111
111
New contributor
New contributor
add a comment |
add a comment |
up vote
1
down vote
The only solution that will not hurt your SEO is to prevent your JavaScript from changing the page title for that particular page (perhaps with an if
statement as Warren mentioned).
A good rule of thumb (and the rules for many search engines including Google) is to always show the search engine the exact same thing you show the user. If you don't want it indexed in the search engine that way, simply don't show it to the user that way.
add a comment |
up vote
1
down vote
The only solution that will not hurt your SEO is to prevent your JavaScript from changing the page title for that particular page (perhaps with an if
statement as Warren mentioned).
A good rule of thumb (and the rules for many search engines including Google) is to always show the search engine the exact same thing you show the user. If you don't want it indexed in the search engine that way, simply don't show it to the user that way.
add a comment |
up vote
1
down vote
up vote
1
down vote
The only solution that will not hurt your SEO is to prevent your JavaScript from changing the page title for that particular page (perhaps with an if
statement as Warren mentioned).
A good rule of thumb (and the rules for many search engines including Google) is to always show the search engine the exact same thing you show the user. If you don't want it indexed in the search engine that way, simply don't show it to the user that way.
The only solution that will not hurt your SEO is to prevent your JavaScript from changing the page title for that particular page (perhaps with an if
statement as Warren mentioned).
A good rule of thumb (and the rules for many search engines including Google) is to always show the search engine the exact same thing you show the user. If you don't want it indexed in the search engine that way, simply don't show it to the user that way.
answered 24 mins ago
Maximillian Laumeister
2,121520
2,121520
add a comment |
add a comment |
up vote
0
down vote
What you are doing is a form of cloaking. It is against Google's Webmaster guidelines to show users one text and the search engine a different text. You need to set your titles such that the same title is seen by both users and Googlebot. If you show Googlebot different content, Google is likely to penalize your entire site such that it doesn't show up in the search results.
The reason that Google is picking up the dynamic title is that Googlebot is now able to execute the JavaScript. The fix should be to use the same title for both users and bots.
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
add a comment |
up vote
0
down vote
What you are doing is a form of cloaking. It is against Google's Webmaster guidelines to show users one text and the search engine a different text. You need to set your titles such that the same title is seen by both users and Googlebot. If you show Googlebot different content, Google is likely to penalize your entire site such that it doesn't show up in the search results.
The reason that Google is picking up the dynamic title is that Googlebot is now able to execute the JavaScript. The fix should be to use the same title for both users and bots.
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
add a comment |
up vote
0
down vote
up vote
0
down vote
What you are doing is a form of cloaking. It is against Google's Webmaster guidelines to show users one text and the search engine a different text. You need to set your titles such that the same title is seen by both users and Googlebot. If you show Googlebot different content, Google is likely to penalize your entire site such that it doesn't show up in the search results.
The reason that Google is picking up the dynamic title is that Googlebot is now able to execute the JavaScript. The fix should be to use the same title for both users and bots.
What you are doing is a form of cloaking. It is against Google's Webmaster guidelines to show users one text and the search engine a different text. You need to set your titles such that the same title is seen by both users and Googlebot. If you show Googlebot different content, Google is likely to penalize your entire site such that it doesn't show up in the search results.
The reason that Google is picking up the dynamic title is that Googlebot is now able to execute the JavaScript. The fix should be to use the same title for both users and bots.
answered 2 hours ago
Stephen Ostermiller♦
66.3k1390239
66.3k1390239
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
add a comment |
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
Well basically my index page is example.com and the other pages are example.com/day/date. They are all linked to the same base page but are changed dynamically relative to date. When it's the regualar example.com url I want a normal title.
– WillBDev
1 hour ago
add a comment |
WillBDev is a new contributor. Be nice, and check out our Code of Conduct.
WillBDev is a new contributor. Be nice, and check out our Code of Conduct.
WillBDev is a new contributor. Be nice, and check out our Code of Conduct.
WillBDev is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Webmasters Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebmasters.stackexchange.com%2fquestions%2f119457%2fgoogle-showing-dynamic-page-title-set-by-javascript-rather-than-the-static-title%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown