How to Create a URL File on Mac: Step-by-Step Guide
In this article
To create a URL file on a Mac, the fastest method is to click and drag the URL from the address bar of your web browser directly onto your desktop or into a folder. This creates a .webloc file, which is the macOS standard for internet shortcuts. When you double-click this file, your default web browser opens and loads the saved page immediately.
A URL file, known technically as a Web Location file on macOS, acts as a pointer. It does not save the actual content of the website (like an HTML save would), but rather stores the specific web address. This is incredibly useful for organizing research, creating a dashboard of frequently used tools on your desktop, or sharing a specific link with another Mac user via AirDrop or a shared folder. Because it is a small system file, it takes up virtually no disk space and remains functional as long as the destination website is still active on the internet.
What You'll Need
- A Mac running macOS.
- A web browser installed (such as Safari, Google Chrome, or Mozilla Firefox).
- An active internet connection to navigate to the page you wish to save.
Step-by-Step
- Open Your Web Browser: Launch your preferred browser from the Dock or Applications folder. While this process works across most modern browsers, Safari is the native experience for macOS and often provides the smoothest integration with .webloc files.
- Navigate to the Target Website: Type the address of the website into the address bar or use a search engine to find the specific page you want to link to. Ensure the page has fully loaded so that the URL in the address bar is the final, complete destination (including any specific sub-folders or query parameters).
- Prepare Your Workspace: Arrange your windows so that you can see both your browser and the location where you want to save the file. For example, if you want the shortcut on your desktop, shrink the browser window so a portion of the desktop wallpaper is visible. If you want it in a specific folder, open that folder in Finder and place it side-by-side with the browser.
- Identify the URL Handle: Look at the address bar at the top of the browser window. In Safari, you will see the website address. In Chrome or Firefox, you will see the full URL. To the left of the web address, you will typically see a small icon (a favicon) or a security lock icon. This icon is the "handle" you will use to drag the link.
- Drag and Drop: Click and hold your mouse button (or press down on the trackpad) on the lock icon or the favicon in the address bar. While holding the button down, drag the cursor away from the browser and over to the desktop or the open Finder folder.
- Release to Create: Let go of the mouse button or lift your finger from the trackpad. You will see a new file appear instantly. By default, macOS names this file based on the title of the webpage. The file extension is .webloc.
- Rename the Shortcut: If the automatic name is too long or vague, click the file once to select it, then press the Return key on your keyboard. Type a more descriptive name (e.g., "Project Research - Phase 1") and press Return again to save the change.
Common Mistakes
One of the most frequent mistakes users make is trying to drag the text of the URL instead of the icon. If you highlight the text of the URL and drag it to the desktop, macOS may simply create a plain text snippet or a "clip" of the text rather than a functional .webloc file. To ensure a working shortcut, always grab the lock icon or the small site icon to the left of the address.
Another common error is confusing a URL file with a "Save Page As" action. If you go to File > Save As in your browser, you are downloading the actual HTML code and images of the page to your hard drive. This creates a large file that can be viewed offline but does not automatically update when the website changes. A .webloc file is a shortcut; it is tiny and always points to the live version of the site.
Users also sometimes attempt to create these files by right-clicking on a link within a webpage and selecting "Save Link As." Depending on the browser, this may save a different file type or attempt to download the linked document (like a PDF) rather than creating a macOS system shortcut. The drag-and-drop method from the address bar is the only consistent way to generate a native .webloc file.
Tips
To keep your desktop from becoming cluttered, create a dedicated folder in your Documents directory named "Web Shortcuts" or "Bookmarks." You can then drag your .webloc files into this folder and add the folder to your Finder sidebar for one-click access from any window.
If you frequently use a set of URLs, you can create an "Alias" of the .webloc file. Right-click the .webloc file and select "Make Alias." You can then move that alias to a different location, such as your desktop, while keeping the original organized in a folder. This allows you to have the same shortcut in multiple places without duplicating the file itself.
For those who use multiple browsers, be aware that the .webloc file will always open in your system's Default Web Browser. If you created the shortcut while using Chrome but your default browser is set to Safari, double-clicking the file will open the page in Safari. You can change your default browser by going to System Settings > Desktop & Dock (or System Preferences > General in older versions) and adjusting the "Default web browser" dropdown menu.
Troubleshooting
If you drag the URL and nothing happens, first check if your browser window is in full-screen mode. In full-screen mode, you cannot see the desktop behind the window. Either exit full-screen mode by clicking the green circle in the top-left corner or use Mission Control (F3) to see your desktop spaces, though dragging across spaces can be finicky. The most reliable way is to use a windowed browser.
If the file is created but will not open when double-clicked, check the file extension. If it was accidentally renamed to something like .txt or .jpg, macOS will not know to use a browser to open it. Right-click the file, select "Get Info," and look at the "Name & Extension" section. Ensure it ends in .webloc. If it does not, correct the extension and confirm the change in the dialogue box that appears.
If you are dragging from a browser and it creates a text file instead of a .webloc file, try a different browser to see if the issue persists. Some third-party browsers may handle the drag-and-drop event differently. Safari is the most reliable for this specific macOS feature. If you are using a browser where the icon drag doesn't work, you can manually create a .webloc file using a text editor, though this requires formatting the file as a Property List (.plist) XML, which is significantly more complex than the drag-and-drop method.
Frequently Asked Questions
Will a .webloc file work on a Windows PC?
No, .webloc files are proprietary to macOS. If you send a .webloc file to a Windows user, they will not be able to open it by double-clicking. For cross-platform compatibility, it is better to copy and paste the actual URL text into an email or document.
Can I change the icon of a URL file?
Yes. You can copy an image (Cmd+C), right-click the .webloc file, select "Get Info," click the small icon in the top-left corner of the info window, and press Cmd+V to paste the new image as the icon.
Does a URL file save my login information?
No. A .webloc file only saves the web address. It does not save usernames, passwords, or cookies. When you open the link, you will still need to log in to the website as usual.
What happens if the website is taken down?
The .webloc file will still exist on your Mac, but when you double-click it, your browser will load a "404 Not Found" or "Server Not Found" error page because the destination no longer exists.
Can I put URL files in a folder and sync them via iCloud?
Yes. Because they are standard files, you can place them in your iCloud Drive folders. This allows you to access your web shortcuts across multiple Macs signed into the same Apple ID.