Apparently in Firefox you have to do this in about:config.
Wherever I use quotation marks in the following lines, make sure to omit them when actually entering something, e.g. for "about:config" you just enter about:config.
So, open a tab and type in "about:config" in the address field (where www.google.com
or whatever usually goes).
Then enter "browser.fixup.alternate.enabled" in the "Filter" field. Only that line will appear, and under "Value" it should say "true". If it says "false" double click that line, which will change it to "true."
Next in the "Filter" field enter "browser.fixup.alternate.prefix". This should have "www." under "Value." If it doesn't, double click the line, a box will appear where you should enter "www." (make sure to enter the ".").
Next in the "Filter" field enter "browser.fixup.alternate.suffix". This should have ".com" under "Value." If it doesn't, double click the line and enter ".com"
I hope this helps.