Most entrepreneurs understand the importance of a business name to their branding. New business owners spend sleepless nights brainstorming the perfect name. But after you’ve picked a name, what’s the next step to making sure everything is legal?

The most important reason to register your business name is because that’s the law. Generally speaking, the public needs to know who is behind a company. The one exception is when a sole proprietor conducts business with his or her own name; so if Jane Doe runs an accounting business as Jane Doe, there’s no need to register that name.

The other key reason to register a business name is to prevent anyone else from using it. After you’ve spent months or years building your brand, the last thing you want is someone else to come into the market and start using the same or a very similar name. When it comes to protecting your brand, you’ll have to decide if it’s important to claim your name in all 50 states, or if your own state is enough.

Related: 3 Common Mistakes to Avoid When Naming Your Business

There are three key paths to registering and protecting your business name. Here we’ll break down the differences so you can decide which route is best for you.

1. File a Doing Business As (DBA). The simplest way to register a name is by filing a DBA with your state. This is also called a Fictitious Business Name. Maybe you’ve noticed all those classified listings in the local paper for Fictitious Business Names.

If you have a sole proprietorship, a DBA is the way to use a business name without having to create a formal entity (such as a corporation). For example, if Jane Doe wanted to operate her accounting business as “Numbers by Jane,” then she would need to file a DBA for “Numbers by Jane.” Again, that’s so there’s a public record to let people know who is running the business.

There’s one more situation where you need to file a DBA. Let’s say you have an LLC named “Jane’s Company, LLC” but you also want to start doing business as “Jane’s Company Too.” You’ll need to get a DBA for Jane’s Company Too.

2. Create an official business structure. When you form an LLC or corporation for your business, this will automatically register your business name with the state. Before your LLC/corporation application is approved, the state will first make sure that no one else already has the same/similar name in the state. Then, once approved, no other business will be able to come in and use your name in the state.

Related: Growing Your Business When You Can't Trademark Your Name

Keep in mind that this doesn’t offer you any kind of brand protection in the other 49 states. If you’re operating a local business (i.e. a restaurant), then registering your name with the state might be enough protection for you. But if you are planning on expanding nationally, operating on the web or providing services/selling products nationwide, then you should take your brand protection to the next level with a trademark.

3. Get a trademark. If you want to get serious about protecting your name and brand in all 50 states, then you’ll need to apply for a trademark with the U.S. Patent and Trademark Office (USPTO).

You’re not actually required to register a trademark. As soon as you start using a name, you get “common law” rights to that name. So why take the time to register? Registered trademarks enjoy stronger protection than common law marks. If you’ve registered your trademark, it’s going to be much easier to recover your property (for example, if someone starts using your company name as their Twitter handle).

If you are going to apply for a trademark, it’s smart to conduct a comprehensive search beforehand to make sure no one is already using your proposed name in a similar capacity. That’s because if your name isn’t available, your application will be rejected right away. You will lose your application fee, in addition to all the time you invested in preparing the application.

As you are getting your new business off the ground, make sure you’ve taken the right legal steps to use and protect your name. Your name represents everything that your business is about, so you’ll need to get serious about protecting it.

Related: The S Corp Deadline Is Approaching: What to Know