This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

mozilla.cfg not working

more options

I've created autoconfig.js file in mozillafirefox\defaults\pref and also created the mozilla.cfg file and dropped it onto the mozillafirefox\ program folder. The file name in autoconfig.js does match the config file of mozilla.cfg. I'm unable to get firefox to recognize any of the settings! I have also used this text in my config file and I'm not able to see that string in the about:config page of firefox //mozilla.cfg file 9/5/2019 lockPref ("a.b.c.d", "e.f.g.h");

I don't know what I'm doing wrong and I've been reading forums on how to troubleshoot this issue. Nothing is working. What am I missing! Can someone please advise!

I've created autoconfig.js file in mozillafirefox\defaults\pref and also created the mozilla.cfg file and dropped it onto the mozillafirefox\ program folder. The file name in autoconfig.js does match the config file of mozilla.cfg. I'm unable to get firefox to recognize any of the settings! I have also used this text in my config file and I'm not able to see that string in the about:config page of firefox //mozilla.cfg file 9/5/2019 lockPref ("a.b.c.d", "e.f.g.h"); I don't know what I'm doing wrong and I've been reading forums on how to troubleshoot this issue. Nothing is working. What am I missing! Can someone please advise!

Chosen solution

No, what you have typed in the file is fine. I'm referring to the actual name of the mozilla.cfg file.

Do the following:

  1. Open the folder that has the mozilla.cfg file in it.
  2. Select View at the top of the window.
  3. Check File name extensions.
  4. Rename the file to mozilla.cfg, not mozilla.cfg.txt.
Read this answer in context 👍 0

All Replies (12)

more options

In this situation, it's usually best to post the contents of the two files so that we can see what's wrong. I assume that you've also already reviewed this, but if you haven't, Customize Firefox using AutoConfig has full details on how to setup the AutoConfig.

Your autoconfig.js file should look like this:

pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);

A common mistake is that some people start listing preferences on the first line of their .cfg file, but you need to leave a blank line at the top.

However, in this case, I'm going to guess that the general.config.filename value doesn't match the name of your CFG file and/or that it's not located in the correct folder.

Hope this helps.

more options

If Firefox recognizes the autoconfig.cfg file and there are errors in the file then you check the Browser Console for possible error messages.

What is the content of the autoconfigjs file?

The autoconfig.js file that specifies to use autoconfig.cfg is placed into the "defaults\pref" directory where the channel-prefs.js file is located.

//
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
  • autoconfig.cfg and autoconfig.js need to start with a comment line (//)
  • autoconfig.js needs to use Unix line endings (LF instead of CR/LF)

See also:

more options

The file names match from the autoconfig file and the mozilla.cfg file. I've attached screen shots of the files.

I checked the browser console in firefox and there aren't any errors. I have the autoconfig.js file living here: C:\Program Files\Mozilla Firefox\defaults\pref I have the mozilla.cfg file living here (just to clarify this is a config file, not js file): C:\Program Files\Mozilla Firefox

I also have channel-prefs.js and local-settings.js living here: C:\Program Files\Mozilla Firefox\defaults\pref

I've attached screen shots of those files too.

more options

The first two screenshots do not show a file extension which should be .js. The third screenshot shows the mozilla.cfg fille with the correct file extension.

I'm not sure why you posted two screenshots with file content that should be in the autoconfig.js file in the defaults\pref folder. There should only be one autoconfig.js file in defaults\pref and you can remove the local-settings file.

Can you confirm that autoconfig.js is a .js file and doesn't have a hidden .txt file extension and that autoconfig.js uses Unix line endings (LF instead of CR/LF)?

See:

Modified by cor-el

more options

If the Mozilla.cfg file name wouldn't match then you would get an error message. Since you do not get an error message then it is likely that there is a problem with the autoconfig.js file.

more options

I'm not sure what you mean by "I'm not sure why you posted two screenshots with file content that should be in the autoconfig.js file in the defaults\pref folder."

I've attached a screen shot of the defaults\pref folder with the autoconfig file shown as javascript. I'm not sure what could be wrong with the autoconfig file.

more options

Your mozilla.cfg file is not a CFG file, it's a text file. If it was, Notepad would display the title as simply mozilla, since it excludes file extensions in the title.

So your file is actually probably called mozilla.cfg.txt, which won't work properly.

It might appear in the file browser as mozilla.cfg, but that's because Windows hides the file extension. Notice that the autoconfig.js file displays simply as autoconfig.

In the file browser, select View at the top of the screen and then check File name extensions to see the full file name or right click the file, select Properties and observe the Type of File information.

Hope this helps.

Modified by Wesley Branton

more options

If I change the file type of cfg - the file name would only be 'mozilla' is that how the autoconfig.js script should read? // pref("general.config.filename", "mozilla"); pref("general.config.obscure_value", 0);

more options

No. You should keep mozilla.cfg in the autoconfig.js file.

You only need to make sure that the file names are correct because Windows has the (bad) habit to hide some file names and this can easily lead to confusion.

Did you verify that autoconfig.js is using Unix line endings?

Notepad might not be the best editor in this case.

more options

Seçilmiş Həll

No, what you have typed in the file is fine. I'm referring to the actual name of the mozilla.cfg file.

Do the following:

  1. Open the folder that has the mozilla.cfg file in it.
  2. Select View at the top of the window.
  3. Check File name extensions.
  4. Rename the file to mozilla.cfg, not mozilla.cfg.txt.

Modified by Wesley Branton

more options

Thank you Wesley!! I had the file name was mozilla.cfg.cfg. I removed the duplicate extension and it worked! Thank you so much for your help!!

more options

Glad I could help!

If you haven't already, please select the answer that solves the problem. This will help other users with similar problems find the solution.

Thank you for contacting Mozilla Support.