How to Fix 'Undefined' Being Added to a URL in Chrome

by JoHarrington

Many Chrome browser users have been encountering 404 pages, redirected from a perfectly good webpage. Here's how to stop that happening.

It's the redirect from Hell. It begins with a page taking a while to load, then you find the URL adding 'undefined' on Chrome. Suddenly the whole webpage has gone and you're staring at a 404 page.

Not fun, but easily fixed.

The root of the problem is in Chrome Extension Plug-ins. The main issue is determining which one, as at least two of them cause the error.

But webmasters can also help with the insertion of some javascript.

What Does the Undefined Bug Do?

It redirects webpages to another page, which doesn't exist. That causes a 404 page to be displayed instead.

The affected websites tend to be those with a search box inserted.  Examples include Urban Dictionary and, unfortunately, Wizzley, which is how I came to know about it.

I don't use Google Chrome.  I don't like the way that it tracks everything that you do and you have to jump through hoops just to have some privacy.  But many of my friends contently browse through Chrome.  Two of them were the ones experiencing the 'undefined' problem.

The bug would take any URL and add the suffix /undefined.  This caused the browser to look for another webpage, which simply didn't exist.  The result was a standard 404 page like this:

Image: Example of Undefined Added to a URL
Image: Example of Undefined Added to a URL

Please note the URL there.  It was rendered as this:

http://wizzley.com/plush-super-mario-boss-toys/undefined

The Chrome user did not add slash undefined.  The bug just caused that to happen.  Anyone else would have seen the article as it should have been displayed.  As you would clicking the link below in fact!

Bowser never looked this cuddly before! Check out the bosses in the Super Mario plush toy collection.

Plug-in Causes Chrome Browser URLs to Redirect

At least it does if '/undefined' is being added onto the end of a webpage address.

So far I've found two culprits, though there may also be a third.  Both are dealt with in the same way, so the instructions to fix the problem apply to either.

  • Complitly
  • Site Advisor (McAfee)

These Chrome extensions are causing the internal broken links by adding undefined to the URL.  The latter may or may not be clashing with AVG Safe Search, if the user has both added.

These are not malware, nor are they loaded with spyware. Your system is quite safe and secure.

Complitly is advertized as a search engine tool.  It guesses what you're searching for and so completes the URL.  It could be viewed as useful for those who struggle with spelling, as the search term does not have to be exact.

McAfee is a reputable antivirus software.  It blocks malicious programs and the like from infecting your computer.   Site Advisor is just one component in the whole package.  It inspects the webpage before it loads, then sends an alert if all is not well.

The 'undefined' error does not occur within the remit of either of these tools.  It's merely a glitch that somehow got into their usual programming, when coupled with the Chrome browser.  It's probably just coincidental that the former is a rival to Google, while the latter has been purportedly rendered obsolete by the in-built security programs in locked-down Chromebook.

I'm so glad I use Firefox.

Remove Plug-in Extensions to Stop 'Undefined' Being Added to a URL

Chrome users can stop seeing 404 pages - because '/undefined' is there - by removing the plug-in which is causing the redirect.   This can be done via the Extensions tab in Chrome.

Step one is to access your settings menu. 

Click on the icon indicated here.  It can be found on your topmost toolbar in Google Chrome, in the top right-hand corner.

Select 'Settings' from the pull-down menu.

Select Extensions from within the Settings menu.

Now that you are inside your Extensions area, you should be able to see a list of all the plug-ins currently running within your Chrome browser.  

You are looking for Complitly or Site Advisor.  If neither are there, then I have a hunch that AVG Safe Search may be an issue.  I have not tested this yet, so please do take that purely as a guess. 

It may be that other anti-virus programs clash with Chrome too, if they insert something which interferes with normal searches.  Google have crowed long and hard about their locked down browser not needing bolt on anti-virus programs.  (And sane people have treated that bragging with the disdain it probably deserves.  Stopping .exe files from opening does not a completely safe browser make.) 

Moreover, Google's main business model revolves around a search engine.  The company isn't thrilled when you start asking third parties, like McAfee, Kaspersky, AVG, Norton etc. to mess with that.

The only two extensions currently proven to cause '/undefined' to appear at the end of a webpage address are Complitly and Site Advisor. 

Click the trash can icon alongside the plug-in(s) that you want to remove.

Once it's been removed from Chrome, you should no longer experience the '/undefined' redirect error.

Protecting Your Website from '/Undefined' Causing a 404 Redirect

As a webmaster or webmistress, you may have encountered these 404s in your error log. There are steps which you can take to reduce them.

I recommend keeping an eye on this thread on the Google Product Forums.  There is a large group of people hunting for the definitive solution.  So far, two ideas have been mooted:

  • Rename your search fields.  Epommate discovered that Complitly was one of the causes and that it attacked search box code.  By changing the name on the tags to, say, sea2rch (or reche2rche in French), it stopped the '/undefined' appearing in URLs.
  • Add javascript to your search fields.  Willy Barro found this solution, which works only if the error has been caused by the Complitly plug-in.  The script below should be added to any page which contains a search field, preferably between the head tags:

<script type="text/javascript">
    window.suggestmeyes_loaded = true;
</script>

 

If none of this has fixed the error for your browser or website, then please check back.  More solutions will be added as I learn them.  In the meantime, perhaps it's time to switch to Firefox.

Updated: 03/09/2014, JoHarrington
 
Thank you! Would you like to post a comment now?
8

Comments

Only logged-in users are allowed to comment. Login
QuantumLouie on 09/16/2015

Yeah this bug is driving me crazy I think it has to do with the new (no flash) chrome update.

James on 08/13/2015

Hi doel,

Me too, always from Firefox, always from Windows OS.

I have added this line to .htaccess to reduce server load:
RedirectMatch 204 (.*)undefined$
this will reply to those requests with a 204(no-content) instead of a full 404.

I have not been able to identify the source of this, sometimes it is just a few requests per ip but sometimes it just keeps coming, a have had 65,000 from the same ip, around 1 a second for over 21 hours. would love to work out what is causing it!!

doel on 08/03/2015

sorry to bring up old post. any other solution to this?

i have this problem, on about 10% of total my pageviews, so it's a lot. my daily around 50k pageviews, with 5k pageviews for page with "undefined" added at the end, but the unique only 50 (yes, just fifty unique pageviews, compared to five thousands pageviews)

i've tried the complitly solution, no progress at all.

on my raw log, all this undefined url from firefox, with windows OS

JoHarrington on 03/11/2013

Willy Barro - Ah! Thank you for the clarification. I will amend that.

And it's us who ought to be thanking you for services to internet-kind. You're the one who worked out the coding. Thank you! <3

JoHarrington on 03/11/2013

Tim - I'm very glad to hear it!

Willy Barro on 03/11/2013

"The script below should be added to any and all search field code:" - It should be added to every PAGE that has a search field, preferentially between head tags. By the way, thanks for giving the credits! :)

Tim on 03/11/2013

That fixed it. Thank you.

You might also like

How to Blitz Viruses and Spyware for Free

Let me introduce you to my old friends SUPERAntiSpyware and MalwareBytes' Ant...

CCleaner: A Safe and Free Way to Speed Up Your PC

Computer housework is often forgotten, until the whole thing grinds to a chug...


Disclosure: This page generates income for authors based on affiliate relationships with our partners, including Amazon, Google and others.
Loading ...
Error!