protected function _singleScan($url, $referer = null)
    {
        $url = clean_url($url, true, true);
        if (!$this->canBeScanned($url)) {
            return null;
        }

        $this->dispatchEvent('LinkScanner.beforeScanUrl', [$url]);
        $response = $this->_getResponse($url);
        $this->dispatchEvent('LinkScanner.afterScanUrl', [$response]);

        //Follows redirects
        if ($response->isRedirect() && $this->getConfig('followRedirects')) {
            $location = $response->getHeaderLine('location');
            if (!$this->canBeScanned($location)) {
                return null;
            }

            $this->dispatchEvent('LinkScanner.foundRedirect', [$location]);

            return call_user_func([$this, __METHOD__], $location);
        }

        $this->ResultScan = $this->ResultScan->appendItem(new ScanEntity([
            'code' => $response->getStatusCode(),
            'external' => is_external_url($url, $this->hostname),
            'location' => $response->getHeaderLine('Location'),
            'type' => $response->getHeaderLine('content-type'),
        ] + compact('url', 'referer')));

        return $response;
    }