Mobile app version of vmapp.org
Login or Join
Cofer257

: I've noticed a bizarre (malicious?) behavior in my website logs My website logs spit out "invalid content" messages -- they typically occur when someone types in a wrong hyperlink or a page

@Cofer257

Posted in: #Logging #Spam

My website logs spit out "invalid content" messages -- they typically occur when someone types in a wrong hyperlink or a page has mistakenly changed URLs. Lately (about 20 times per day) I've been noticing a trend with these logs. It's probably best explained with an example:

Assuming a page URL is www.myswebsite.com/news/1048/title-of-some-news-item, I will receive one of those log messages that says someone tried to visit something along the lines of www.mywebsite.com/news/1048/titlee-of-some-news-itm or some variation that is incredibly close to the original slug, with just a few characters added, changed, or removed. The id (1048 in this case) is always the same.

I don't think people are mistake-prone enough to do this 20 times per day. Is this a bot? Is it common, and what are they trying to accomplish?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gail5422790

A possibility is that these hits are made through links that people have added to their blogs/sites or shared with others using email, social networks etc.

It's happening to me all the time. They try to add a link to their website, but they do not make the copy paste correctly or they add extra characters or even delete some of them (accidental/mistaken keystrokes).

That's why some of the last characters are missing or url variations appear.

Suggestion

If you load the page based on post's id for example 1048, try to redirect to the correct slug if the slug is not the correct one

Also if the post's id does not exists but the slug exists, redirect to the correct url again.

If the given post's id is invalid or does not exist, and also the slug does not exists, try to find the most relevant url to redirect to, or display an error 404/410 with the urls that are the most relevant, so that the visitor can click and be redirected to the article that he wanted to read.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme