Java script links in Wordpress causing 404 not found
-
hi everyone, I've just done a moz crawl on my new site and am getting as few 404 errors on certain urls
http://www.wilsonfield.co.uk/services/equity-finance/197/
after analyzing the link its the 197 which is a href="#197", this is controlled by javascript to show hide additional data
Is there anyway to stop these links being crawled or fixing the 404 as there is no /197 it is just a link to hidden content
-
Alternatively you could do this an entirely different, and better IMHO, way by putting all of that content ON the page and using div tags with "display:none" that will change to display the content when the link is clicked, activating an on-click javascript event. This sounds complicated but really it is what most eCommerce stores do when they have tabbed content (e.g. product description, details, specs, shipping....) that doesn't all display at once and requires a user to click a tab to show the content there.
Here is a simple example with information on how to implement it.
-
I assume one of the places this issue can be found is on your About page where the visitor can learn more about each member of the team.
I am not a developer and am going to speak about this to the best of my knowledge. It may not be "technically" accurate, but I hope it will be more helpful to you than complicating the situation...
The URL being linked to, such as .../194 should probably be /#!194 instead, which would allow you to change the content via AJAX without changing the URL of the page (as a hashbang URL is treated much like an internal page link, known as a named anchor, which takes you to a different part of the page instead of a new page/URL).
Please see https://developers.google.com/webmasters/ajax-crawling/docs/getting-started for more information on implementing Google-friendly, crawlable content with AJAX.
I will leave this question open for discussion in case others have more to add.
-
Last Modified Found.Server Response HTTP/1.1 200 OKHTTP/1.1 200 OKDate: Wed, 04 Sep 2013 15:25:03 GMTServer: Apache/2.2.16Last-Modified: Wed, 04 Sep 2013 15:08:36 GMTAccept-Ranges: bytesContent-Length: 35798Cache-Control: max-age=3, must-revalidateExpires: Wed, 04 Sep 2013 15:25:06 GMTVary: Accept-Encoding,CookieContent-Type: text/html; charset=UTF-8You also have an issue where your server When not adding the #197 is not rendering a 304 this is a signal to Google that there has been changes in your site and necessary.http://www.feedthebot.com/tools/if-modified/ just to be on the safe side I checked your site for any Malware what I did find is an internal Path errorhttp://sitecheck.sucuri.net/results/www.wilsonfield.co.uk/services/equity-finance/ on the URL without the hash tagWordpress internal path: /www/sites/248/ccf/www.wilsonfield.co.uk/web/wp-content/themes/wilsonfield/index.php now using the same test and adjust your domain I get a error and you can see the first error is WP-Ajax-response.JS I think that is your issueWeb application version:
WordPress version: WordPress
Wordpress version from source: 3.6
Wordpress Version 3.5 for: http://www.wilsonfield.co.uk/wp-includes/js/wp-ajax-response.js
WordPress theme: http://www.wilsonfield.co.uk/wp-content/themes/wilsonfield/
Wordpress internal path: /www/sites/248/ccf/www.wilsonfield.co.uk/web/wp-content/themes/wilsonfield/index.php you may also want to look at the results here and see all the URLs listedhttp://sitecheck.sucuri.net/results/www.wilsonfield.co.uk so you know I get similar issues when I tried to scan your exact URL using the hash taghttp://sitecheck.sucuri.net/results/www.wilsonfield.co.uk/services/equity-finance/197/ I hope this helps you, Thomas -
I agree with you it most likely is the #197
however Google bot is able to crawl your site. The most effective method I can think of is to take the site that is not intentionally hidden from Google and 301 redirect it to the proper URL.
After that then take the new URL and add it to google index via Webmaster tools as well as posted on twitter to get it indexed faster if you feel that is the need.
The hash tag is showing you're using Ajax which is most likely causing this issue. Is there a reason you created this # tag link?
Was it part of analytics this most likely has everything to do with your analytics tracking you may want to look at that prior to changing URLs.
Take a look at your site using this tool it will show you essentially what Google bot is able to see.
http://www.feedthebot.com/tools/spider/test.php
The site code I'm looking at is in need of optimization also the twitter button that should appear at the bottom is not rendering correctly in Safari just so you know.
I can recommend a high-quality developer if you need one.
Hope this helps,
Thomas
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Links on my website do not get highlighted by Moz bar in Chrome
I've used the Moz bar for many years to quickly figure out if a link is followed or no-followed. I recently used a Wordpress plugin to build lists of subjects and excerpts of pages with appropriate links. An example is at https://www.chicagotraveler.com/chicago-parks/ This is the main Parks section page. Below the map is a set of links and descriptions of each park in this section of the site. The problem is that when I use the Moz bar to look at this page, the links are not highlighted no matter which settings I click on. Followed, No-followed, External or Internal. I've looked at the code and while there is a bit of css nearby the links, they look fairly normal. Does this mean that moz thinks there is something wrong. Do you think google will also ignore these links? Should I scrap the plugin and build and maintain these lists manually?
Moz Bar | | EdKim0 -
When I try to run a Moz report, it sends me to a 404 page?
Hey there. I'm trying to export a .pdf to send to my client. When I click "export pdf", the page sits for a second then goes to a 404 page? I've never seen this before. Is anyone else getting this problem?
Moz Bar | | TaylorRHawkins2 -
Changed Domains and Internal Links haven't followed, Old Domain redirects to new domain
On our domain residentiallandlord.com we are a little confused on the Compare Link Profiles option,I'm wondering if you can helpWe changed our domain a few years back and have our old domain redirected to our new domain.On our new domain we have only internal links visible, https://residentiallandlord.com/wp-content/uploads/2018/06/moz-rl.com.pngbut if you look at our old domain, which goes to our new domain it has loads of internal links, even though there is no physical site on this domain as it redirects to our new one, https://residentiallandlord.com/wp-content/uploads/2018/06/moz-rl.co.uk.png Can you help me understand why no internal links are showing for the new domain and how to fix this.
Moz Bar | | karlh19740 -
What does the external links column mean in the crawl report , thanks
Hi, Ran a report for www.dare2b.com report, and it showing 34780 external links. What does this mean Thanks Jeff
Moz Bar | | jefffox0 -
External Links not showing in MOZ?
Hello:) I have a ton of external links on my site, but there not showing on MOZ? The reason i'm slightly concerned is because my top competitor has 80 and I show as only having 3? Does any one know why this would be? Also, my traffic on MOZ is a lot lower then my traffic report on Google Analytics? Is that normal, & which should I trust more? Here's my Site: Www.ThumannAgency.com Thank you in advance:)
Moz Bar | | MissThumann0 -
Does the competitive link finder work?
Trying to find link ops for www.gartner.com/technology/research/top-10-technology-trends/ Thanks, Mike Corso
Moz Bar | | Mike_c0 -
My product pages have no weight / links from root domains with the Moz tool bar
Hi, When I view my home page (http://www.arkwildlife.co.uk) with the Moz toolbar, I see a good PA and a good amount of links from root domains. As I go down the site, it seems to get worse. The category pages (http://www.arkwildlife.co.uk/Category/0/Straight_Foods.html) have a little but not much and then from this point onwards, it's nothing. The product page (http://www.arkwildlife.co.uk/Item/Straight_Foods~Sunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html) is reporting to have no root domain links but I am not sure why. Interestingly, when I click through to a review page (http://www.arkwildlife.co.uk/StockReview/0/SUNH/0/Premium_Sunflower_Hearts.html) it does have some juice. Would anyone be able help on why this is happening and what I need to be looking at in order to resolve it please? EDIT: I've been looking at the hyperlinks and notice something odd. If I review the score with the first link below, it gives a score of 1, but the second gives a PA of 13 with one root domain linked. 1:http://www.arkwildlife.co.uk/Item/Straight_Foods~Sunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html 2:http://www.arkwildlife.co.uk/Item/Straight_Foods%7ESunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html Please note the "%7E" instead of the "~" in the URL. The browser appears to show the ~ character no matter what but the rank of the page changes. I don't understand what the Moz toolbar is doing with this. Note: This behaviour only happens in Mozilla Firefox, in chrome both the rankings are zero for each URL. Many Thanks.
Moz Bar | | nawgie0 -
Crwal errors : duplicate content even with canonical links
Hi I am getting some errors for duplicate content errors in my crawl report for some of our products www.....com/brand/productname1.html www.....com/section/productname1.html www.....com/productname1.html we have canonical in the header for all three pages <link rel="canonical" href="www....com productname1.html"=""></link rel="canonical" href="www....com>
Moz Bar | | phes0