I recently tried to open a URL link I saved onto my desktop by double clicking it, but it will not open correctly. If I DRAG & DROP the file into chrome works fine.

The code of the file is as follows:


the file is saved with a ".url" extension

If I double click on the file I'm prompted by finder to choose which application to open it with (Chrome is greyed out, but I choose 'All Applications' and then choose Chrome), it will then simply load a page in Chrome and display the code on the page, instead of opening the url specified in the code.

running Version 50.0.2661.94 (64-bit) on OSX 10.9.5

  • 1
    I made a .url file using your example and get the same results as you. Commented May 6, 2016 at 21:11

7 Answers 7


This is a known issue with Google Chrome. See:Chrome doesn't recognise .url files properly

The workaround it to use an Extension such as .URL Handler

Once installed you need to go to Chrome > Preferences... > Extensions (chrome://extensions/) and check the [✔] Allow access to file URLs check box.

enter image description here

  • IS there a similar feature for Ubuntu ? These Chrome extenstions do not work on Ubuntu Commented May 6, 2016 at 21:35
  • 1
    @Kalamalka Kid, I haven't looked to see about Ubuntu as this forum is for Apple stuff. Stack Exchange has an Ask Ubuntu forum too. Commented May 6, 2016 at 21:38
  • 1
    As of March 23, 2020, Chrome version 80.0.3987.149, this .URL extension doesn't work anymore. No solution. Commented Mar 23, 2020 at 11:47

OK did some digging around. It turns out that Google Chrome's security model normally doesn't allow clicking on .url files to open them.

There is a Chrome extension that will allow this though so the solution is easy for OSX users.


I don't know if this is relevant to Apple, but on Windows I changed the default app for .url from "Google Chrome" to "Internet Browser". It sort of makes sense as it seems like parsing the URL file is up to the OS then the browser opens the URL.

Maybe Apple has a similar setting without resorting to browser add-ons.

This was the source that I tested in Windows 10: Chrome opening internet shortcuts as file not as website


As URL files are just text files, I have solved this problem by attaching a script as handler to them, which reads the URL from the file and opens that URL with the default web browser. The following Nim script does this. I only tested it on my own operating system, but it should also work on Linux and macOS.

You need to compile it. Install Nim and then run nim compile urlhandler.nim on it. Then assign your URL files to the created executable.

# urlhandler.nim

import os, system, re, browsers, strutils, strformat

# You can change this. Use lowercase.
let URLEXTS = [".url", ".open"]

# ↑ I added the '.open' file type because on my OS it is not trivial to attach
# new programs to the URL filetype in the default file explorer. So lets create a
# new filetype, and attach this exe to it. Then batch renaming *.url files to
# *.open files (programmatically or by hand) shouldnt be too difficult, is it?

var url: string
    proc bye(reason: string) =
        echo "*** ERROR ***"
        echo "\n" & reason
        echo "\n(press key to close)"
        discard readLine(stdin)

    var oldname: string
            oldname = commandLineParams()[0]
        except IndexDefect:
            bye "Please provide a file"
        if not oldname.fileExists:
            bye fmt"{oldname} does not exist"
        oldname = oldname.expandFilename

    let (_, title, ext) = oldname.splitFile
    let cleanext = ext.toLower

    if cleanext in URLEXTS:
        let filecontents = readFile(oldname)
        if filecontents.isEmptyOrWhitespace:
            bye fmt"{title & ext} is empty."
        let urlpattern = re(
            ^ \s* URL \s* = \s* ( [^\s]+ )
            flags = {reExtended, reMultiLine}
        var matchgroups: array[1, string]
        if filecontents.find(urlpattern, matchgroups) > 0:
            url = matchgroups[0]
            bye fmt"""
            {title & ext} has an unknown format. I was expecting something like ...


            ... but instead i got ...

            """.dedent &
        bye fmt"""unsupported filetype: "{ext}". If you want to have it """ &
        "supported, add it to the URLEXTS list."



Alternatively, you can use the terminal for this. The terminal can then open the URL on the corresponding web browser.

open -a "Google Chrome" https://www.textnow.com/login 
  • This doesn't address the problem described in the question, which might explain the downvote you got. But using the Terminal is a good idea actually, something like open -a "Google Chrome" $(sed -n '/^URL=/s/^URL=//p' shortcut.url) would actually work.
    – nohillside
    Commented Apr 2, 2021 at 8:41

Although this is problem for BROWSER (not Apple) I will add solution for Windows too:

Open Start>Settings>System>Default apps and check that Google Chrome is chosen under Web Browser. Also open up Choose default apps by file type, scroll down to .url file and choose "Internet Browser" next to it.


If you don't want to use an extension you can use PowerShell to retrieve the URL link and open it.

  1. Open Registry Editor
  2. Take ownership and get write permission of registry keys HKEY_CLASSES_ROOT\InternetShortcut\shell\open\command and HKCR\InternetShortcut\ShellEx\ContextMenuHandlers\{FBF23B40-E3F0-101B-8488-00AA003E56F8}
  3. Remove key HKCR\InternetShortcut\ShellEx\ContextMenuHandlers\{FBF23B40-E3F0-101B-8488-00AA003E56F8}
  4. Edit the entry HKEY_CLASSES_ROOT\InternetShortcut\shell\open\command to be as follows. I use MS Edge, if you use Chrome you need to change the MS Edge path to Google Chrome path

powershell.exe -Command "$URL= ((Get-Content '%1') -like 'URL=*') -replace 'URL=',' '; Start-Process 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe' -ArgumentList $URL"

If the change does not take effect immediately you may have to kill and restart explorer.exe

  • Please note that the question is asking for a solution for macOS. Your solution is for Windows.
    – agarza
    Commented Nov 19, 2022 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .