Welcome Guest, Not a member yet? Register   Sign In
Google Search Console not indexing default route
#1

Hello,
I created a personal website using Codeigniter 4. The server runs nginx on Ubuntu.
My problem is that the homepage indexing on Google. All other pages are indexing as expected. Google URL Inspection shows 5xx server error, however I can reach the page from a web browser.
Can someone suggest whats going wrong?
Thanks
Reply
#2

See CodeIgniter Error Logs.
https://codeigniter4.github.io/CodeIgnit...error-logs
Reply
#3

Thanks for your response. I could figure out the problem by reviewing the logs.
I would like to draw your attention to the documentation. Maybe the example has the following line wrong:
$currentAgent = $this->agent->robot();
Example in the documentation:
Code:
$agent = $this->request->getUserAgent();

if ($agent->isBrowser()) {
        $currentAgent = $agent->getBrowser().' '.$agent->getVersion();
} elseif ($agent->isRobot()) {
        $currentAgent = $this->agent->robot();
} elseif ($agent->isMobile()) {
        $currentAgent = $agent->getMobile();
} else {
        $currentAgent = 'Unidentified User Agent';
}

echo $currentAgent;

echo $agent->getPlatform(); // Platform info (Windows, Linux, Mac, etc.)
Reply
#4

Thank you.
I created a PR: https://github.com/codeigniter4/CodeIgniter4/pull/5146
Reply




Theme © iAndrew 2016 - Forum software by © MyBB