Setting Naver as default search engine in Safari

One of the limitations of using Apple devices in Korea is that Naver is not one of the default search engines available to Safari. This is one reason that many people prefer to just use the official Naver app when doing a web search, even if Safari would be a lighter or potentially faster alternative. 

While there is no "official" way to make searches typed in the Safari search bar direct to Naver, here's a way that I've been using. So if you or your mom, dad, or grandpa want all their search results coming from Naver, whether on iPhone or Mac, give this a try. It's not exactly setting Naver as the default search (I took some liberties with the post title) but its net effect is just as good. 


Redirect Google searches to Naver



Userscript redirect: Google to Naver


Basically, I'm just using a userscript to redirect the search. This method will basically just do a Google search like normal, but then immediately redirect the page to the same search results on Naver. It sounds cumbersome, but after it's run the first time, I notice it happens pretty speedily so that I don't really even notice it.

To do this you'll need two things: a userscript app, and the code I provide below.

Userscript app for iOS and macOS


I'm using the amazing and completely free and open source Userscripts. This is an extension that works on iPhone and Mac. You can run any number of userscripts (small bits of code) with it, but it could equally be used for this one single trick. 

Google to Naver redirect code


Once you have that installed, create a new userscript with it and paste in this code:

// ==UserScript==
// @name         Google to Naver Search Redirect
// @namespace    http://10wontips.blogspot.com
// @version      0.1
// @run-at      document-start
// @description  Redirects Google search pages to Naver search with the same search term
// @author       Sam Nordberg
// @match        https://www.google.com/search*
// @grant        none
// @icon         https://www.google.com/s2/favicons?sz=64&domain=naver.com
// ==/UserScript==

(function() {
    'use strict';

    // Check if the current URL is a Google search page
    if (window.location.href.includes('google.com/search')) {
        // Extract the search term from the Google URL
        const searchTerm = new URLSearchParams(window.location.search).get('q');

        // Construct the Naver search URL
        const naverSearchUrl = `https://search.naver.com/search.naver?ie=utf8&query=${encodeURIComponent(searchTerm)}`;

        // Redirect to the Naver search page
        window.location.href = naverSearchUrl;
    }
})();

This is most easily done if you have the app installed on both your Mac and your iPhone, since the scripts can sync. 



If you're on iPhone only, then paste the above code into a plain text document, save the document with a name like "naver-redirect.user.js" (make sure the file ending is .user.js - you may have to manually rename the file in Finder) and save that file to your iPhone files. Point the Userscript app to use that file. 




Usage notes

  • This script will only run on the Google search results pages, so shouldn't interfere with any other browsing. 

  • Of course this means you won't really be able to search Google anymore without it automatically redirecting to Naver. If that's an issue for you, you could also set Safari's default to a different search engine and have that redirect instead, leaving you free to still use Google.

  • You can also edit the code to redirect to Daum or any other search engine. 

  • This method is nice because it means you can initiate the search from Spotlight. 

  • Note that this sort of redirect is also available inside the popular StopTheMadness app. 

Other methods


Bookmarklet


There are some other ways of getting a sort-of Naver search within Safari. One is starting the search using a Bookmarklet but that has the limitation of requiring you to remember to hit that Bookmarklet every time. See more on that here:


Text replacement


Another way I found was to use the iOS built-in text replacement function. This involves setting a shortcode that iOS will automatically expand into the full Naver search URL, then typing your search.

For example, set a text shortcut to "!네" or "!N" and have it automatically expand to:

https://m.search.naver.com/search.naver?query=

Then, you can just type "!네 잘실역" and get the Naver search results for Jamsil Station.

Using text replacement to initiate Naver search on iOS,
via 아이폰 사파리 검색창에서 네이버 검색 방법 - 익스트림 매뉴얼


Overall, I find the userscript method best, at least until Apple provides a way to add custom search engines. Of course outside of Safari, this is just a simple settings change. But if you prefer Naver and like using Safari, give the userscript method a try for now. 


HT to Daring Fireball from which I thought of this idea.

Comments