You can form your business in whatever state you like, but must have a "registered agent" in that state. So if you would like to form a Nevada LLC or Corporation even though you are in California, you can do that. You would need to designate someone in Nevada to be a "registered agent" for your business - you would use that person's mailing address as the registered agent on your forms with the state. A registered agent is someone who has a physical address (PO Box won't work) and who is willing to accept service of process if you get sued. There are many lawyers and others who will serve as "registered agents" for a small annual fee.
You mentioned a "license" but I believe what you are referring to is your Incorporation or LLC -- your actual business. Typically a business license is something you would get from your City or County where you actually operate -- you would still need to get a business license from your city, even if you are Incorporated in Nevada.
Incorporating in a different state can sometimes be beneficial for asset protection, but I would need much more information about your situation to advise you on whether that is an effective or legal strategy for you to follow and whether incorporating in Nevada would do anything to help you.
If you find my answer helpful, please mark it "best answer" or "helpful" so that the attorneys who volunteer their time to answer these questions have this feedback. This answer is intended to give general educational information to the public, and is provided as a result of your request for such information. It is not customized legal advice for your situation. This answer does not establish an attorney-client relationship. You can contact me directly, and we can decide together whether I am the right attorney for you. Only an attorney licensed to practice in your jurisdiction, and talking to you about the details of your own unique situation, can provide personal legal advice.
You can do this if you get the right lawyer. Likely you will want a California or Nevada Internet lawyer and preferably one with offices in both places. Pick one with Intellectual Property law expertise as you have a number of choice, clearance and confirmation issues in IP law with domain names, trademarks, servicemarks, tradenames, dba filings, copyright and Internet law policies and setup. You can go to the Find A Lawyer tab to find one. My recommendation would be you contact this one http://www.avvo.com/attorneys/89135-nv-marc-randazza-1269075.html
I am not your lawyer and you are not my client. Free advice here is without recourse and any reliance thereupon is at your sole risk. This is done without compensation as a free public service. I am licensed in IL, MO, TX and I am a Reg. Pat. Atty. so advice in any other jurisdiction is strictly general advice and should be confirmed with an attorney licensed in that jurisdiction.
With respect to the first portion of your question, you should contact an attorney who specializes in asset protection. As for the licensing of the business, you are required to register the company with the California Secretary of State, regardless of where the company is set up, if you will be doing business in California.
Just having a business license in NV is not going to protect your assets from wife's X. You need to have more of a presence in NV. But if you have contacts in California that may subject your California assets to your wife's X long arm of the Divorce Court.
The above is not legal advice. It is an illustration of options that can be used in certain situations. I have not examined all of your facts, if I did I might provide a different response.
I think that you are confusing a business license with forming a corporation. You could easily form an LLC in Nevada but you would still need to obtain a business license in California because that is where your business is based. If the LLC is set up good, it will provide some asset protection, but keep in mind that there is no true 100% asset protection available, you can just make it harder for the other party.
The more important question to ask is: On what basis does your wife's ex-husband have a claim against your assets? If he has no legitimate claim, then you are spinning your wheels. Forming a business entity in a different state for asset protection is rarely a good strategy for a small business owner. It increases the administrative burden to your business and may require you to make tax and other filings in both states. This just increases your cost of doing business. The truth is, if someone wants to find out who the owner of your business is, they will be able to do so whether its formed in California or Nevada. Stick with a California entity and be sure to separate your business and personal affairs. Also, sit down with an attorney to hash all this out. You can probably decide on the best course of action in a short consultation that is free of charge.