Setting Safari Homepage

Chuey
Contributor III

In previous versions of Mac OS I was setting users home page in Safari with a PKG that copied a com.apple.Safari.plist to their own /Library/Preferences/ folder or in a policy under Files & Processes and running the jamf command to enable home page.

I also use to be able to dismiss the Welcome startup screen and change the default open behavior from Favorites to Homepage.

I've had no success testing with El Capitan and wondering what is working for others?

Any help is much appreciated.

Thanks,

1 ACCEPTED SOLUTION

May
Contributor III

i use this as a custom setting in a configuration profile

Preference Domain is com.apple.Safari

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>HomePage</key>
    <string>https://your.url.here</string>
    <key>NewWindowBehavior</key>
    <integer>0</integer>
</dict>
</plist>

View solution in original post

18 REPLIES 18

SincerelyJoshin
New Contributor II

If devices are being imaged, homepage is a button in the configuration wizard. I also use a configuration profile to manage those keys in Safari (NewTabBehavior, NewWindowBehavior, HomePage, etc.) and would recommend the same.

Chuey
Contributor III

Thanks @jdhovinetz I'll probably test the config profile to do this for the home page.

Chuey
Contributor III

@jdhovinetz I'd like to create a configuration profile for this. What I did was set up my Safari Environment including homepage > then I copied my own ~/Library/Preferences/com.apple.Safari.plist and then uploaded to my custom payload in configuration profile.

I noticed there is no "HomePage" value in there? What does your process look like for this?

May
Contributor III

i use this as a custom setting in a configuration profile

Preference Domain is com.apple.Safari

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>HomePage</key>
    <string>https://your.url.here</string>
    <key>NewWindowBehavior</key>
    <integer>0</integer>
</dict>
</plist>

Chuey
Contributor III

@May Thanks! This worked.

I guess I was doing something wrong or it has changed with recent versions of Mac OS because I use to do it the same way before.

What i was doing was setting my Safari environment > copying the com.apple.safari.plist file > making it an xml file by running plutil -convert xml1 > upload that into my custom payload area > and it wouldn't work.

But what you supplied me does indeed work.

Thank you very much

May
Contributor III

@Chuey

Glad it worked for you, as far as i remember the NewWindowBehavior means any new windows will open with an empty page

TajChana
New Contributor II

@May Can you post an example of this, I'm struggling to get this done..

Chuey
Contributor III

@May @TajChana For a user who has never opened safari it still displays the welcome message. It only goes to the home page i set if I have opened safari previously. I have not been able to get it working either. Any help is much appreciated.

rcarey912
New Contributor II

@Chuey I'm sure that you have figured it out by now but the Plist key controlling whether or not the welcome page is shown to new users is

#!/bin/sh
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>LastSafariVersionWithWelcomePage-v2</key>
    <string>9.0</string>
</dict>
</plist>

Not sure if that is on every version, but that key works for us running macOS 10.12.4 and Safari Version 10.1

Chuey
Contributor III

@rcarey912 I never figured this out I just let it be - so I should be able to add this key value to com.apple.safari to suppress that welcome screen? thanks for that.

jamfnc
New Contributor III

I have used the following from May as below and it it working for 10.11.x, 10.12.x and 10.13.x deploying via Configuration Profiles > Custom Settings. Thank you very much.

I have tried Managed Prerences > Safari and found that it is not working. I have tested "jamf -setHomePage -homepage <company web site> -feu -fut" and found that it is not working on 10.13.x

  • I think JAMF should provide a Configuration Profile to deploy Home Page for all browsers

Preference Domain is com.apple.Safari

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> <key>HomePage</key> <string>https://your.url.here</string> <key>NewWindowBehavior</key> <integer>0</integer>
</dict>
</plist>

rl2k05
New Contributor

Has anyone ever figured out how to get the first time users browser to go directly to the home page in the above plist?

donmontalvo
Esteemed Contributor III

Apple won't document it, but they recently confirmed if you push a Config Profile to set the Homepage, you can then remove it and user gets it set but not locked down. How useful is this. Plenty, for us. But not if you're using MDM. Pushing a config profile to set the key once per user per computer is fine.

Whether Apple pulls the rug out of under us, and breaks that workflow, is a totally different conversation.

--
https://donmontalvo.com

AVmcclint
Honored Contributor

Is there a published list of all keys and values that can be used to build a Safari Config profile? I want to see what all the available options are and figure it out from there. I'm glad the snippet posted by @May still works even into Mojave, but what other keys are there for us to use?

woodsb
Contributor

Check out my post here.

howie_isaacks
Valued Contributor II

I just created a configuration profile, and then uploaded a plist file containing these lines. I created the plist file in BBEdit, saved it as a plist, and then ran plutil -convert xml1 plistname.plist to convert it to a file that can be imported into the profile in the Application & Custom Settings payload. This worked. It prevents the user from changing the homepage, and it sets Safari to open the home page on new window, and new tab.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> <key>HomePage</key> <string>https://yourwebsite.com/</string> <key>NewTabBehavior</key> <integer>0</integer> <key>NewWindowBehavior</key> <integer>0</integer>
</dict>
</plist>

Confirmed this works for OS 14.5 and Safari 17.5. Just have to make sure you indent and line break properly or Jamf won't read the plist properly.

Nice! I responded to this post over 3 years ago. I still get emailed responses to a lot of posts. It's fun to go back and see what I was saying years ago.