Forum Moderators: martinibuster

Message Too Old, No Replies

Ads when Internal links. Could Google penalize me?

Showing ads at 'mypage#section3'

         

guarriman3

2:45 pm on Feb 20, 2022 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi,

I've got webpages with some sections with internal links from the top side, and two AdSense ads only at top side:

[ADSENSE AD HERE]
Contents:
<a href="#section1">Section 1</a><br />
<a href="#section2">Section 2</a><br />
<a href="#section3">Section 3</a><br />
<a href="#section4">Section 4</a><br />
[ADSENSE AD HERE]
...
<a id="section1">This is Section 1</a>
blah blah
<a id="section2">This is Section 2</a>
blah blah
<a id="section3">This is Section 3</a>
blah blah
<a id="section4">This is Section 4</a>
blah blah


Most of my visitors come from the Google search results, directly to the internal links that are shown in such search results:
http://example.com/mypage#section3

The result is that such visitors do not see the two AdSense ads at the top side of the webpages, because they are forwarded to #section3.

I've created a new design where the visitors accessing through 'http://example.com/mypage#section3' do not see the two top ads, but two other ads in the section.

I wondered if Google could penalize me for this technique (because they understand I'm changing the contents somehow).

Thank you very much.

phranque

11:47 pm on Mar 1, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Most of my visitors come from the Google search results, directly to the internal links that are shown in such search results:
http://example.com/mypage#section3

everything after the # in a url is considered a document fragment identifier.
"the document" in this case is defined by http://example.com/mypage

I wondered if Google could penalize me for this technique (because they understand I'm changing the contents somehow).

it depends.
how are you "changing the contents somehow"?
(i assume using javascript...)
this means the http://example.com/mypage document is requested from the server and rendered by the browser and then the browser tries to resolve/find the #section3 document fragment identifier.
perhaps during page rendering your javascript looks at the document fragment identifier to change the page contents "somehow".
"it depends" refers to whether or not google has ever tried to render your document using various fragment identifiers and there's no way to know since the fragment identifier is never sent with the request and is therefore no logged on your server.

NickMNS

12:51 am on Mar 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



how are you "changing the contents somehow"?
(i assume using javascript...)
this means the http://example.com/mypage document is requested from the server and rendered by the browser and then the browser tries to resolve/find the #section3 document fragment identifier.

That is not how I read it.
The link is on the http://example.com/mypage and clicking it simply scrolls to the fragment identified by the fragment identifier, no JS just standard html and no requests.

As to the question of whether Google will penalize you? The type of links or where the links point to is not relevant in this case. The questions to ask are:

1- Given the ads placement, is the ad visibly and unquestionably seen by the user as an ad or can the ad be mistaken for your own content? Remember when considering this questions that the content of the ads changes, so there may be a case when this is obvious and others isn't. But it needs to always be obvious.

2- Is there sufficient spacing so that user will not mistakenly click on the ad when clicking the link, and this on all device and screen sizes?

2.5- Also be sure that there is no CLS so that the ad's placement doesn't shift as the page is loading leading to invalid clicks.

Other than that there should be no issue.

phranque

1:26 am on Mar 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



That is not how I read it.
The link is on the http://example.com/mypage and clicking it simply scrolls to the fragment identified by the fragment identifier, no JS just standard html and no requests.

this is how i read it:
Most of my visitors come from the Google search results, directly to the internal links that are shown in such search results:
http://example.com/mypage#section3

i.e., no on page "click/scroll"...

phranque

1:33 am on Mar 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



clicking it simply scrolls to the fragment identified by the fragment identifier, no JS just standard html

even in the case of an actual click, it is relevant to note that the onclick JS event can be handled in a way that differs from normal browser behavior.

NickMNS

4:01 am on Mar 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think the only thing that is clear is that @guarriman3 needs to clarify what the situation is.

If fragment URLs "#" sometimes called hashbangs is being used than that is a problem, not in terms of AdSense but in terms of Google search, because it is obsolete and not supported by Googlebot.

See this for details:
[developers.google.com...]
Specifically this part:
Sometimes developers decide to use fragments with JavaScript to load different content than what is on the page without the fragment. That is not what fragments are meant for and won't work with Googlebot.

phranque

5:48 am on Mar 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If fragment URLs "#" sometimes called hashbangs is being used than that is a problem, not in terms of AdSense but in terms of Google search, because it is obsolete and not supported by Googlebot.

you may be thinking of hashbang (#!) urls, which is a different implementation for a different problem

[edited by: phranque at 5:55 am (utc) on Mar 2, 2022]

phranque

5:54 am on Mar 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A proposal for making AJAX crawlable [developers.google.com]

NickMNS

4:14 pm on Mar 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



you may be thinking of hashbang (#!) urls,

That could be true. I really don't know for sure as I have never used either method. But the link I provided above doesn't make the distinction between #! and #, it refers to "Fragment URLs" and clearly states:
won't work with Googlebot.

The link I provided is dated May 2020.

If JS/AJAX is used then the correct way to manage the resulting URLs is using the History API.
[developer.mozilla.org...]

phranque

10:54 pm on Mar 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I think the only thing that is clear is that @guarriman3 needs to clarify what the situation is.

...so that we can get the discussion back on topic...
=8)