Something is creating strange URLs in Wordpress Website - wordpress

I have a problem with a Wordpress based website. Something is creating strange URLs. I know about those URLs, because Google Webmaster Developer try to Crawl them and the Crawler gets a 404 error (Not found). I have that problem in different websites:
In the first one the URLs looks like spam:
http://xxxx.com/wp-content/w3tc/apple-iphone-3gs-8gb-black-manual
In the other website the URLs make sense based on the content, but they are not valid URLs:
http://xxxx.com/portfolio/pool-view-suite-bathroom/
In other website, it's creating URLs that looks like valid, but with a ".html" in the final
If you try to access those URLs, you will get a 404 error. Curiously, when you look the "Linked By" tan in Google Developer Tools, you will see that is linked by another strange URL o there is no linked from. And that URLs are not in the sitemap, I checked it.
Thank you!

the first one is a trojan without a doubt. Quite usually, you'll find them in index.php, footer.php, header.php . If in doubt, check with an online tool like Sucuri
Once you isolate it, it's very important to know how you have it. While most people thinks they have been "hacked", in most cases you uploaded it by yourself from your own computer, so be sure to scan it thoroughly.
About the other cases, sounds more like an htaccess issue, but based on the first case, quite probably it's caused by this trojan as well. Ask your host to check the site, it's in their best interest to do it so. But assuming it's just htaccess, try this: go to Settings --> Permalinks and change the permalinks structure to anything else than what you have now. Don't hit the submit button yet. In the meanwhile, BACKUP your htaccess file and then delete it. Hit submit on the permalinks page an a new .htaccess file will be created. Try your site now. If it works, it was just a simple htaccess issue. If not, something else, going from a trojan to a server misconfiguration to anything in between

Maybe the domain was used before and you are seeing past valid urls which are now 404, or maybe these are incorrect, inbound spammy links which you would want to be 404. Duff links can be found anywhere on the internet and so no reason to think your site is generating them.

Related

Problem with Page has redirected JavaScript

I did an audit of my website and it sends me this message
"Page has redirected JavaScript"
Issue details
Some pages on your website link to JavaScript files via a redirect.
This forces web browsers and search engine crawlers to make an additional HTTP request in order to reach the destination JS file URL. On a vast scale, this can increase page loading times for your website.
How to fix
Review the pages that have a link to the redirecting URL and replace this link with the direct link to the destination JS file.
If you decide to keep links to redirecting URLs that do not belong to your website, make sure that the destination files are relevant.
And I get several links like these:
https://script.crazyegg.com/pages/scripts/0012/9265.js
https://s7.addthis.com/ with randoms numbers
Has anyone had a similar problem who can help me to see how to solve the problem?
It sounds like you have some pages that are actually loading a remote JS file, which then redirect to another page on your website.
Why this is happening is anyone's guess - maybe you have a plugin installed that is doing it intentionally as part of it's functionality. I would start by disabling plugins one at a time (ideally on a staging environment) until the problem goes away, and then you'll know who the culprit is and make a decision.

htaccess Google Seach Console Redirect Error Problem

My Wordpress website keeps getting refused by google search console, and i've spent a week trying to fix this problem (tried many different solutions). When I used a third party SEO crawler. It located the redirect error to a problem in http://www.examplesite.com to https://www.examplesite.com .
Google: Page fetch error Failed: Redirect error
So, having had experience before with SSL and redirects with htaccess with different websites before, i thought this would be an easy fix. apparently it isn't, and I still can't find a fix. I tried many different htaccess solutions. All my links in the xml sitemap use https. all my wordpress settings are set to https://www.examplesite.com . And I have no idea what I am doing wrong, what change, and what to do. I can only think the problem lies in the htaccess file. And I don't what code to use anymore. (yes, i've also disabled all the plugins)
Thank you.
Found the solution:
Add code in functions.php:
remove_filter('template_redirect','redirect_canonical');

Audit website my pages have HTTPS URL links to an HTTP URL

I have an wordpress website https://tricourilemele.ro . When doing an audit, my Security Score is showing an high issue: HTTPS URL links to an HTTP URL..
Looking at page source (in fact on all pages) i find these http://gmpg.org/xfn/11 and anther link - which in is in fact a page i made http://tricourilemele.ro/tricouri-personalizate/
Well... i found that http://gmpg.org/xfn/11 in my header is given by my theme - Storefront, even so it had many updates, they never changed that to https.
I tried with a plugin search / replace but i couldn't do any improves .more. i was afraid to try something else. I do not know many related to databases or so..
My problem is ...How could i change those 2 links from http to https?
Please, be
Thank you,
Marius
You'll need to find whatever file gmpg is in, and update the url to https. And then change the url accordingly for the site you created.

Wordpress adding subdirectory to permalinks

Looking into our Google Analytics it seems some people are visiting pages on our site with the wrong permalink. Specifically WP is adding an extra directory on the end for some reason.
www.mysite.com/contact/ <- Correct
www.mysite.com/mysite/contact/ <- Incorrect (some people ending up here)
It seems every page on the site has this problem (some people ending up at /mysite/page/ instead of just /page/
It's a standard WP install (not in a subdirectory), the permalink structure is set as follows:
www.mysite.com/blog/%postname%/
Looking in GA, all the visitors from the wrong permalink are coming from the source/medium of direct/none.
I've ran a URL checker on the site and everything is coming up as 200 OK with none of the wrong permalinks showing anywhere.
Would appreciate any ideas here, pretty stumped on this one! Only thought I have is that maybe it's something to do with the database containing wrong links as my localhost install was localhost:8888/mysite/.
Thanks, Adam
maybe you can rewrite permalinks with help srdb
search: localhost:8888/mysite
replace: www.mysite.com
with http://
Before doing a copy of the database
Thanks for your responses. After considerable digging it turns out GA was logging visits from my local version of the site. Have resolved now.

WordPress with Yahoo! Hosting... Almost there

EDIT:
Yeah, so this problem is really unsolvable. Yahoo prevents access to .htaccess, even from WordPress itself trying to change it. I had to settle for writing a script on the default homepage that redirects browsers to "www.abc.com/index.php" if they go straight to "www.abc.com". You always have to deal with "index.php" being in the address bar but it's better than not having permalinks...
/EDIT
Yahoo! Small Business hosting seems specifically engineered to make WordPress difficult-- but it's my client's host and there's not much I can do about it. I'm trying to move WordPress into the root directory, and I'm sooo close to having it done.
I've read and read and read about how to get the Permalinks to work right, and since Yahoo! hosting doesn't let you modify htaccess I am pretty much up s*** creek. I'm using the simple permalink structure of "/%postname%/", which once I moved to the root, stopped working. I have changed it to "/index.php/%postname%/", which allows you to see the pages if you manually type in index.php before the page name or if you are logged into the admin area and "View Page". Also, the correct permalink shows on all of the pages in the editor.
However, WordPress doesn't let you change the permalink of the static page you use as the front page.
Long story short, if I go to "www.abc.com/index.php", the links in the menu all work fine. However, if I just got to "www.abc.com", the links don't pick up the "index.php" from the permalink structure. I need to fix this, so if anyone knows how to either:
Change the permalink of the static front page
Fix something in the database if I install PhpMyAdmin
Work around not having access to .htaccess
Put a small script somewhere on the index page to append "index.php" to the url
Any other suggestions
It seems it would work if I was NOT using a static front page but rather the blog, but this isn't an option. I've tried changing the "Tag base" setting to no avail, as well as deactivating the Yahoo! Custom Permalinks plugin (and reactivating it again after that failed...). Could really use some help!
Check out Giving Wordpress its own directory. I can see how this could solve your problem. Also make sure that you have done the obvious, and change your url for WordPress address (URL) Site address (URL) inside the general settings page. Perhaps the static homepage should be developed outside of wordpress, and then you can follow the steps provided in the link I provided. Hope this solves your issue.
Yahoo doesn't allow users access to the htaccess file which means that you can't the mod_rewrite rules needed for custom permlinks. The Only way around it that i've heard it works (never tried it myself) is to add /index.php/ to the beginning of your custom structure so: Go to Permalink Settings > Select Custom Structure. And set the value as /index.php/%postname%/ or what ever you want as long as you add /index.php/ before it.
Hope this helps.
I had a similar problem with this host (in 2018! 4 years after your question) that I finally solved by changing the permalink settings.
Settings > Permalink Settings > Custom Structure: /index.php/%postname%/
I wish there was a better solution but Yahoo Small Business still doesn't allow .htaccess files - after several frustrating rounds with customer service, I finally admitted defeat and used this work around.

Resources