How can I make my MacBook prioritize my phone's hotspot?

I just got a Macbook Air M3 and like it quite a lot. There's one thing I can't figure out however:


I have an old and slow home router, "home wifi" that is on 24/7. When I come home, I suppleant this wifi network by activating my phone's hotspot to get way better speeds, however, the macbook isn't switching over to this network by itself so I have to manually click "phone wifi" on the mac every time after I've started my phone's hotspot. How do I tell the computer to prioritize my phone wifi over the old home wifi?


ps. Noticed that both of those wifi networks have the "Automatically join this network" ticked, which I assume is correct.



[Re-Titled by Moderator]

Posted on Feb 6, 2025 2:45 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 6, 2025 4:44 AM

Right, been doing some digging... you may be able to manipulate the service order still, but using terminal commands...


Using this command in terminal should display the list of known networks and the order they're currently in:

  • networksetup -listpreferredwirelessnetworks en1


Just check whether your Wi-Fi interface is en0 or en1 or something else. You can use "networksetup -listnetworkserviceorder" to see all the interfaces, and their names and device number.


You can use combination of the following commands to manipulate the order of the wifi networks. In your case, you may only need to move your hotspot SSID to the top of the list; so that you Mac prefers to join that network first whenever is available.


  • networksetup -listpreferredwirelessnetworks <device name>
  • networksetup -addpreferredwirelessnetworkatindex <device name> <network> <index> <security type> [password]
  • networksetup -removepreferredwirelessnetwork <device name> <network>
  • networksetup -removeallpreferredwirelessnetworks <device name>


You could try using the following for example:

  • syntax: networksetup -addpreferredwirelessnetworkatindex <device name> <network> <index> <security type> [password]
  • example: networksetup -addpreferredwirelessnetworkatindex en1 Hotspot 0 WPA2


I'm estimating that because the network already exists, you may not require the password. This should move the network "Hotspot" to the top of the list. You can check the list order again by using the first command again. You may need to remove the network and add it back where you want it in the list.


Happy hunting.

17 replies
Question marked as Top-ranking reply

Feb 6, 2025 4:44 AM in response to snurrespratt

Right, been doing some digging... you may be able to manipulate the service order still, but using terminal commands...


Using this command in terminal should display the list of known networks and the order they're currently in:

  • networksetup -listpreferredwirelessnetworks en1


Just check whether your Wi-Fi interface is en0 or en1 or something else. You can use "networksetup -listnetworkserviceorder" to see all the interfaces, and their names and device number.


You can use combination of the following commands to manipulate the order of the wifi networks. In your case, you may only need to move your hotspot SSID to the top of the list; so that you Mac prefers to join that network first whenever is available.


  • networksetup -listpreferredwirelessnetworks <device name>
  • networksetup -addpreferredwirelessnetworkatindex <device name> <network> <index> <security type> [password]
  • networksetup -removepreferredwirelessnetwork <device name> <network>
  • networksetup -removeallpreferredwirelessnetworks <device name>


You could try using the following for example:

  • syntax: networksetup -addpreferredwirelessnetworkatindex <device name> <network> <index> <security type> [password]
  • example: networksetup -addpreferredwirelessnetworkatindex en1 Hotspot 0 WPA2


I'm estimating that because the network already exists, you may not require the password. This should move the network "Hotspot" to the top of the list. You can check the list order again by using the first command again. You may need to remove the network and add it back where you want it in the list.


Happy hunting.

Feb 6, 2025 8:20 AM in response to snurrespratt

To the best of my knowledge index starts at 0, which is the "most preferable" network. The list starts at index 0 at the top.


I do think that perhaps you may still not achieve your goal as described. The reason is that the priority set on the network is utilised when selecting which of the available networks to connect to first. But, once it's already connected to a functioning network with adequate service, it has no reason to reevaluate other networks, and will simply remain connected to the home network; despite your hotspot becoming active and being lower index (higher priority).


If you turned wifi off and back on, I suspect only then would it select the hotspot over the home network, based on the order configured. Or, the home networks measured quality needs to reduce sufficiently for the device to reevaluate better wifi networks.


I think as long as the home networks service exceeds some basic thresholds, you computer may remains connected to it.


I wasn't able to find a way to have the list also display the configured index per wifi network.

Feb 6, 2025 3:36 AM in response to snurrespratt

Hello.

Up until MacOS Monterey I am sure you could change the order of the wifi networks to prioritise which wifi network would be preferred. However, that doesn't seem to be an option in Ventura (and above) any longer.


If you click on wifi in the system tray. Then wifi settings. You should be presented with the current wifi networks and other networks in range. If you find "advanced" at the bottom of the window. Within you should find a list of known networks. Previously one could adjust the order of the networks. They seem to simply be in alphabetical order now.

Feb 6, 2025 2:56 AM in response to snurrespratt

Change the order of the network services your Mac uses


If you connect to the internet or a network in several different ways (using Wi-Fi or Ethernet, for example), you can change the order of the network connections your computer tries when you connect.


If you have multiple active connections, your computer tries the one at the top of the list first, then tries the others in descending order.


You can’t change the order of virtual private network (VPN) connections because they already take priority over non-VPN connections.


  1. On your Mac, choose Apple menu  > System Settings, then click Network  in the sidebar. (You may need to scroll down.)
  2. Click the Action pop-up menu , then choose Set Service Order.
  3. Drag services into the order you want.
  4. Click OK.


Feb 6, 2025 4:04 AM in response to snurrespratt

OP wrote " The part that doesn't work is when my mac is connected to "home wifi" and I start the hotspot on the phone to active the 2nd wifi network. The mac still stays on the home wifi indefinitely and doesn't switch over automatically. "


It probable will not Automatically Switch Over without First Disconnection for the Home wifi


Why would it, if it already has a connection ??



Forget this Network on the computer for Your Home wifi


System Setting >> wifi >> Known Network

Feb 6, 2025 3:52 AM in response to Owl-53

Granted. Still I'm not sure I see how this pertains to the problem I'm having. What I need is:


For my mac to connect to "phone wifi" when both wifi networks are active and automatically fall back to the "home wifi" once my hotspot is disabled. This part works.


The part that doesn't work is when my mac is connected to "home wifi" and I start the hotspot on the phone to active the 2nd wifi network. The mac still stays on the home wifi indefinitely and doesn't switch over automatically.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I make my MacBook prioritize my phone's hotspot?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.