The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Redirect issue, I'm getting a redirect on my page
Peacedog
post Aug 24 2022, 12:50 PM
Post #1





Group: Members
Posts: 1
Joined: 24-August 22
Member No.: 28,520



I'm a average html designer, just designing as a side gig. I've used a template to design a site for a group. Each time you first visit the site, whatever link you click takes you to an unwanted site. It differs for who does it, but it's not related to the site. I've gone through the code and I can't find anything that's causing it. Any ideas on how to figure it out? I've checked my servers and computer for malware, but I find nothing. I've gotten complaints from visitors that it's happening to them too.

hillgrovehawks.com

Any ideas are welcomed.

Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 24 2022, 01:22 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Peacedog @ Aug 24 2022, 07:50 PM) *

Each time you first visit the site, whatever link you click takes you to an unwanted site.

Some server malware may add unwanted content on web pages only at a user's first visit (in order to avoid detection by the webmaster). If so, perhaps deleting cookies makes it reappear.

I didn't see anything myself , but I used a browser with restrictions in case it's malware. ninja.gif

QUOTE
It differs for who does it, but it's not related to the site.

Does it look like spammy links? I did notice some of the normal links seem to depend on javascript to function.

QUOTE
I've gone through the code and I can't find anything that's causing it. Any ideas on how to figure it out? I've checked my servers and computer for malware, but I find nothing.

You also use many external script files, containing who knows what...

It could also be malware in the browsers of each affected user, for example from a browser addon/extension/app. Are the affected persons random strangers, or do they have something in common that could explain all of them installing the same browser addon/extension/app (like being friends, relatives or collegues)?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 24 2022, 05:04 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



I don't know how it's done. I can only confirm that it happens.

Somewhat interesting, I clicked Middle School that turns out not to be a clickable link when I revisit the page. The menu folds out when I hover Middle School. Nothing happens when I click it. Still the bad window spawns when I click the text, not when I hover it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 24 2022, 05:10 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



QUOTE(Christian J @ Aug 24 2022, 08:22 PM) *

Some server malware may add unwanted content on web pages only at a user's first visit (in order to avoid detection by the webmaster). If so, perhaps deleting cookies makes it reappear.


Correct. It does.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 24 2022, 05:17 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



I tried to check if it JS, but that didn't work. If I turn JS off I get a basically blank page. Well, it's red and there's a bird flapping, but that's it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 24 2022, 05:34 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



Ah! It isn't about links at all. It's enough to click anywhere on the page for the bad window to spawn.

So, I turned JS off again, deleted cookies, returned and clicked on the red page with the bird. Nothing happened. I guess that's expected. Something server side can't catch a click, I think. That doesn't mean it's only JS though.

Well, I'm afraid that's as far as I get. If I had the stamina I would comment out the scripts one by one and go to the page with cookies deleted and probably find the culprit, or at least part of it, that way. But that's too much work for me. But I suggest you do that. Then we can try to see what that script is up too.

I notice your page sets 4 cookies. At least 3 of them are counter related, judging from their names. Are you aware of them?

acceptcookiefreecounterstat
counter
counter_nv
acceptcookie
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 25 2022, 05:50 AM
Post #7


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Aug 25 2022, 12:34 AM) *

Ah! It isn't about links at all. It's enough to click anywhere on the page for the bad window to spawn.

Can you see any click event in the browser's Inspector? It could be a transparent link covering the entire viewport.

QUOTE
If I had the stamina I would comment out the scripts one by one and go to the page with cookies deleted and probably find the culprit, or at least part of it, that way. But that's too much work for me. But I suggest you do that. Then we can try to see what that script is up too.

Note that a third-party script can be loaded by another script, and because of that is not visible in the HTML source when JS is disabled. It could also come from an external page in an iframe, the latter in turn created by some script (it could be a long chain of obfuscation).

But the origin of it all should be one of your own files, either a JS file or HTML file loading external content.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 25 2022, 03:53 PM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



QUOTE(Christian J @ Aug 25 2022, 12:50 PM) *

QUOTE(pandy @ Aug 25 2022, 12:34 AM) *

Ah! It isn't about links at all. It's enough to click anywhere on the page for the bad window to spawn.

Can you see any click event in the browser's Inspector? It could be a transparent link covering the entire viewport.


I don't know. Can you? biggrin.gif


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 25 2022, 04:55 PM
Post #9


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Aug 25 2022, 10:53 PM) *

I don't know. Can you? biggrin.gif

Seems my Chrome-related browsers display Events Listeners in their Inspector, but not the Firefox-related ones.

Won't check myself. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 05:03 AM