F
Filament6d ago
Finn

Disable search engine indexing

Hi all, I've got a web application that is soley using the admin panel, meaning no Blade views or anything like that. I noticed that when I did a google search for the name of the project that it was showing up in google, which I don't want to be happening for an admin panel. So my question is: How can I add the standard noindex, nofollow meta tags / disable search engine indexing using only the panel builder?
1 Reply
Alexandre
Alexandre6d ago
Hi, For my part, I add the meta tag in the HEAD_START hook directly in the boot() of my AppServiceProvider:
public function boot(): void
{
FilamentView::registerRenderHook(
PanelsRenderHook::HEAD_START,
fn(): string => '<meta name="robots" content="noindex, nofollow" />',
);

}
public function boot(): void
{
FilamentView::registerRenderHook(
PanelsRenderHook::HEAD_START,
fn(): string => '<meta name="robots" content="noindex, nofollow" />',
);

}

Did you find this page helpful?