How to change the New Tab Page in Chrome
Chromium doesn't offer a direct way to change the New Tab Page to a custom URL. However, you can change this with a few lines of JavaScript using a Chrome extension. [1]
background.js
chrome.tabs.onCreated.addListener(function (tab) {
if (tab.pendingUrl === 'chrome://newtab/' && tab.url === '') {
chrome.tabs.update(tab.id, { url: "https://example.com" });
}
});
manifest.json
{
"name": "NTP",
"description": "Overrides the new tab page",
"version": "1.0",
"manifest_version": 3,
"permissions": [
"tabs"
],
"background": {
"service_worker": "background.js"
}
}
If you use a different search engine than Google and want to continue to use the native New Tab Page, set the URL to chrome://new-tab-page/. [2]