How do I avoid auto redirect on Safari while logging in to websites?

When I attempt to login to AT&T's website, I get their login page, but when I enter my user ID and password I get switched to Direct TV's website. This started after I added Direct TV as a website. This only happens on my iMac and only in Safari. If I use Firefox or login from my Apple laptop, it does not happen.


Any idea how to fix this?


[Re-Titled by Moderator]

iMac 27″ 5K

Posted on Feb 21, 2025 1:10 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 26, 2025 5:25 PM

The fact it worked as expected in a different User Account suggests a corrupted file in one of several potential places. Which one is a mystery and since I have no AT$T nor a DirectTV account I cannot even begin to guess.


Back up all data before proceeding, which simply goes without saying.


  • The following instructions may result in some or all of your Safari's Settings becoming reset depending on the extent of troubleshooting progress. If you have any concern at all about that, remember your Time Machine backup is the ultimate "undo" should you find Safari differs substantially from any customization you may have become used to. However, if you take the time to proceed slowly and methodically, there is a high likelihood you will identify and eliminate the problematic file(s) while leaving all others intact.
  • Set aside some time during which you can work with a minimum of distractions and interruptions.
  • At your option you may choose to export Safari's Bookmarks and saved passwords to the Desktop or other location. Read Export Safari data to another browser in Safari on Mac - Apple Support. Should it be required, importing them would be easier than restoring an entire Time Machine backup.



Return to your problematic User Account. Quit the Safari app if it is open. Then, navigate to your User Library by typing the following in the Finder's Go menu > Go To Folder... field.

~/Library


Make it look like this



... and click the Go button. A Finder window will open. The files it contains will be some of your User Account - specific files that are likely to be contributing factors. Other User Accounts have their own User Libraries.


From there, your task is to find certain Safari-related files and drag them out of their locations and onto the Desktop. Each time you do that, open Safari again and determine if the problem is fixed or not. Quit Safari if it is not fixed, and proceed to the next step. When it is fixed, stop.


Open the folder named Saved Application State. Drag the file named com.apple.Safari.savedState onto the Desktop. Then, back out of that folder (use the "back button") which returns you to ~/Library or just repeat the same Go To Folder actions you did before.


Repeating the same general instructions, open the ~/Library/Preferences/ folder. In it, find com.apple.Safari.plist and drag it onto the Desktop.


That is as far as I'll go for the time being, but you should have the general idea. If you need more targeted assistance please ask.


Troubleshooting in this manner is an iterative procedure and is by nature time-consuming. You may consider accelerating the process by moving the entire ~/Library/Safari folder to the Desktop, which is almost certain to work, but it would be less precise and you would never know which file was responsible.


The worst thing that could happen is that you will be logged out of websites and / or have to provide login information and reconfigure other Safari preferences may have been affected, in which case you could always drag those files back into their original locations. And don't forget the "ultimate undo" of Time Machine.


Let me know if anything helps.

10 replies
Question marked as Top-ranking reply

Feb 26, 2025 5:25 PM in response to Alan Derkacs

The fact it worked as expected in a different User Account suggests a corrupted file in one of several potential places. Which one is a mystery and since I have no AT$T nor a DirectTV account I cannot even begin to guess.


Back up all data before proceeding, which simply goes without saying.


  • The following instructions may result in some or all of your Safari's Settings becoming reset depending on the extent of troubleshooting progress. If you have any concern at all about that, remember your Time Machine backup is the ultimate "undo" should you find Safari differs substantially from any customization you may have become used to. However, if you take the time to proceed slowly and methodically, there is a high likelihood you will identify and eliminate the problematic file(s) while leaving all others intact.
  • Set aside some time during which you can work with a minimum of distractions and interruptions.
  • At your option you may choose to export Safari's Bookmarks and saved passwords to the Desktop or other location. Read Export Safari data to another browser in Safari on Mac - Apple Support. Should it be required, importing them would be easier than restoring an entire Time Machine backup.



Return to your problematic User Account. Quit the Safari app if it is open. Then, navigate to your User Library by typing the following in the Finder's Go menu > Go To Folder... field.

~/Library


Make it look like this



... and click the Go button. A Finder window will open. The files it contains will be some of your User Account - specific files that are likely to be contributing factors. Other User Accounts have their own User Libraries.


From there, your task is to find certain Safari-related files and drag them out of their locations and onto the Desktop. Each time you do that, open Safari again and determine if the problem is fixed or not. Quit Safari if it is not fixed, and proceed to the next step. When it is fixed, stop.


Open the folder named Saved Application State. Drag the file named com.apple.Safari.savedState onto the Desktop. Then, back out of that folder (use the "back button") which returns you to ~/Library or just repeat the same Go To Folder actions you did before.


Repeating the same general instructions, open the ~/Library/Preferences/ folder. In it, find com.apple.Safari.plist and drag it onto the Desktop.


That is as far as I'll go for the time being, but you should have the general idea. If you need more targeted assistance please ask.


Troubleshooting in this manner is an iterative procedure and is by nature time-consuming. You may consider accelerating the process by moving the entire ~/Library/Safari folder to the Desktop, which is almost certain to work, but it would be less precise and you would never know which file was responsible.


The worst thing that could happen is that you will be logged out of websites and / or have to provide login information and reconfigure other Safari preferences may have been affected, in which case you could always drag those files back into their original locations. And don't forget the "ultimate undo" of Time Machine.


Let me know if anything helps.

Feb 26, 2025 10:03 AM in response to Alan Derkacs

Thanks. None of the files in that report are responsible for that particular problem.


Next step, create a new, temporary User Account according to Add a user or group on Mac - Apple Support. Log out of your usual Account and log into that temporary one. Skip the steps that ask you to sign in to iCloud and / or set up various features — select Set Up Later and Skip as they appear; for testing purposes they are not important.


Launch Safari and log in to AT$T as you did before — you will obviously need to remember those login credentials since Safari Autofill won't have them.


Same problem? I doubt it, but reply with your results.


Delete that temporary User Account when you are finished troubleshooting: Delete a user or group on Mac - Apple Support

Mar 3, 2025 4:53 AM in response to Alan Derkacs

I first noticed this problem after I had started using Direct TV, which was Dec 2024. Would it make sense to focus first on files with modification date after that?


Yes, absolutely.


When you say if it is not fixed proceed to the next step, is the next step to drag com.apple.Safari.savedState onto the Desktop? So I would do that each time I drag a file to the desktop and it does not solve the problem?


That's not necessary. The "savedState" file is a snapshot of Safari's existing state (websites in existing tabs, windows, etc) which will change every time you quit the app. As such it's not likely to be a contributing factor. It does however reopen those websites, whose content can obviously change in the time between quitting and reopening Safari.


Once you find the culprit you can move all the noncontributing files back, overwriting the newer ones. Or, if you're satisfied with the way Safari is working, trash them.


Some clarification, please. If I drag a file out of the Library to the desktop and that does not fix the problem, shouldn't I put that file back in Library?


Yes... eventually. As a troubleshooting technique though, I prefer to remove files methodically until finding one contributing to the problem. Hopefully it's just one. Then, depending on the degree of effort you want to devote to it, you might consider examining that specific file to determine what's wrong with it. This is something reserved for the overly curious.


At the opposite extreme is indiscriminately dragging an entire User Library to the Trash, which you can do, but is likely to result in more trouble than it's worth. It's akin to determining if the same problem exists in a different User Account; a step you already performed.

Feb 28, 2025 1:07 PM in response to John Galt

Some clarification, please. If I drag a file out of the Library to the desktop and that does not fix the problem, shouldn't I put that file back in Library?


When you say if it is not fixed proceed to the next step, is the next step to drag com.apple.Safari.savedState onto the Desktop? So I would do that each time I drag a file to the desktop and it does not solve the problem?

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 do I avoid auto redirect on Safari while logging in to websites?

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