Can You Get a Restraining Order for Online Harassment?

You can get a restraining order for online harassment if the behavior is more than offensive speech and rises to a pattern of threats, stalking, or conduct that would put a reasonable person in fear or cause substantial emotional distress. The harasser does not have to know you offline, and the harassment does not have to happen in person. Federal law reaches cyberstalking through electronic communications, and every state has a protective order mechanism that can address digital conduct. What decides your case is whether the evidence meets the legal standard, and that is where most petitions succeed or fail.

What Qualifies as Online Harassment for a Court

Rude comments, bad reviews, and single angry messages generally do not qualify. Courts look for a “course of conduct,” which federal law defines as a series of acts over time showing a continuity of purpose. In practice, that means at least two separate incidents of harassing behavior directed at you.

Conduct that commonly clears the bar includes credible threats of violence through any digital platform, repeated unwanted contact by message, email, or social media after you have told the person to stop, and cyberstalking where someone monitors your activity or coordinates harassment against you. Doxing, meaning publishing your home address, phone number, or other personal details to intimidate you or invite others to target you, is another strong basis.

The federal cyberstalking statute makes it a crime to use email, social media, or any electronic communication service in a course of conduct that places someone in reasonable fear of death or serious bodily injury, or that causes or would reasonably be expected to cause substantial emotional distress. Because it covers interstate communications, it reaches almost all internet harassment.

Where Free Speech Limits Restraining Orders

A court cannot use a restraining order to ban speech just because it is offensive, critical, or painful. Orders that sweep in constitutionally protected expression get struck down as overbroad, and judges know this.

The line runs between protected speech and unprotected conduct. True threats of violence, speech integral to crimes like extortion, and genuine stalking fall outside First Amendment protection. Harsh criticism, public disagreement, negative reviews, and inflammatory posts about you usually remain protected. If the heart of your complaint is that someone said mean things about you online, an order is unlikely. If it involves repeated direct contact, threats, or conduct meant to terrorize, you have a real case.

Evidence You Need Before You File

Your petition will rise or fall on documentation. Judges want concrete proof of what happened, when, and how often. A verbal account carries far less weight than screenshots with visible dates, timestamps, and URLs. Start preserving evidence right away, because harassers often delete posts once they suspect legal action.

Capture full context, not fragments. A screenshot of one threatening message helps; a screenshot of the entire thread, including your requests to stop contact, is much stronger. Save complete email headers, not just the body, since headers carry routing information that can help identify the sender. For social media, capture the harasser’s profile page along with the individual posts or messages.

Keep a written log with the date, time, platform, and nature of each incident. That chronology is how you show the pattern courts require. Include any police reports you have filed. They corroborate your account and show the court you took the situation seriously before turning to a civil remedy.

Send a Preservation Letter Early

If you may need to identify an anonymous harasser later, send a preservation letter to the relevant platform or internet service provider as soon as possible. Platforms hold server logs with IP addresses and account details, but many providers only keep this data for a month or two before deleting it. A preservation letter asks the company to hold that data while you pursue legal action.

The letter should state that you are considering legal action, link to the harassing content, describe the specific posts or messages with dates and screenshots, and request that the platform archive all identifying information tied to the account, including IP addresses, login records, and contact details. Most platforms will not release the data without a subpoena, but they will preserve it on a credible hold request.

Filing the Petition and Getting a Temporary Order

You file the petition with your local court, usually in the county where you live. It is a written statement identifying the harasser, describing the conduct, and explaining why you need protection. Most courts have standardized forms, and court clerks or self-help centers can help with the paperwork. Filing fees are waived in most states for petitions involving harassment, stalking, or domestic violence. Where fees do apply for general civil harassment petitions, they typically run from about $50 to $200, with hardship waivers widely available.

A judge usually reviews your petition the same day or the next business day. If the judge finds enough evidence of immediate danger, the court can issue a temporary order without the harasser present. Federal court rules cap temporary orders at 14 days; state courts commonly set the full hearing within 14 to 21 days.

Serving the Harasser

Before the full hearing, the harasser must be formally served with the petition and hearing date. Service is typically done by a sheriff, a process server, or another adult who is not a party. Law enforcement service costs anywhere from free to about $100 depending on the jurisdiction.

Service is harder when the harassment is purely online and you do not know where the person lives. If personal service fails, some courts will authorize alternative methods, including service through email or social media, but only as a last resort. You will generally need to show the account belongs to the person and that they use it regularly.

The Full Hearing

Both sides present evidence and testimony at the hearing. Bring organized copies of everything: screenshots in chronological order, your incident log, any police reports, and witnesses if you have them. The harasser has the right to attend and contest the order, and the judge weighs both sides before ruling.

A longer-term order generally lasts one to five years depending on your state, with the option to request renewal before it expires. Renewal usually requires showing you still have a reasonable fear of further harassment, though you typically do not need to prove a new incident.

When You Do Not Know Who Is Harassing You

Anonymous accounts do not make an order impossible, but they add steps and cost. The usual path is a “John Doe” lawsuit, where you name the unknown person as a defendant and use the court’s discovery powers to identify them.

Once a court allows it, you can subpoena the platform or ISP for records tied to the account. Federal law generally bars ISPs from disclosing subscriber information without consent, but permits disclosure when a court orders it. The court will consider whether you have shown good cause, whether you have a legitimate claim, whether you have any alternative way to identify the person, and whether the information is necessary to move forward.

This is neither fast nor cheap. You will likely need an attorney to file the motions and subpoenas, and the ISP may only be able to provide an IP address, which then has to be traced to a specific person. VPNs or public Wi-Fi can end the trail. Even so, many online harassers are less technically careful than they think, and identification succeeds more often than people expect.

What the Order Actually Covers

A granted order typically prohibits the restrained person from contacting you by any means, including email, text, social media, and through third parties. It can also forbid posting about you online, sharing your personal information, or monitoring your digital activity. Many orders include traditional protections too, such as staying a set distance from your home, workplace, or school. Some restrict firearm possession, which is standard in domestic violence orders and increasingly used in severe stalking cases. The specific terms depend on what you request and what the judge finds justified.

Orders become part of the court record. In some harassment and domestic violence cases, courts will redact your personal information from public records, but that is not automatic. If keeping your address confidential matters, raise it with the judge when the order is issued.

Enforcement in Another State

Online harassment often crosses state lines, which raises whether an order means anything if the harasser lives somewhere else. Federal law requires every state to give full faith and credit to protection orders from other states and enforce them as if they were local. The harasser does not have to register the order in their state for it to be enforceable there.

To qualify for interstate enforcement, the issuing court must have had proper jurisdiction, and the restrained person must have received reasonable notice and an opportunity to be heard. Where a temporary order was issued before the harasser had notice, the court must give them an opportunity to respond within a reasonable time. Orders meeting these conditions are enforceable in every state and territory.

What Happens if the Order Is Violated

Violating a restraining order is a crime, not just a civil matter. If the harasser contacts you, posts about you, or does anything the order prohibits, they can be arrested and prosecuted. A first violation is typically a misdemeanor with potential jail time and fines. Repeat violations, or violations involving new threats or violence, are often charged as felonies with substantially harsher penalties.

Federally, violating a protection order can carry up to five years in prison for a basic violation, up to 10 years if the violation involves serious bodily injury, and up to life imprisonment if the victim dies. Federal prosecution is most likely when the violation crosses state lines or uses interstate communications.

If a violation happens, document it the same way you documented the original harassment: screenshots, timestamps, and a police report. Do not respond to the contact. Call law enforcement, give them your evidence and a copy of the order, and let the system enforce it.

If the Court Denies Your Petition

A denial is not the end. If a court commissioner rather than a judge reviewed your petition, you can often request review by a judge, typically within 30 days. If a judge denied it, you may be able to appeal, though that process is complex and realistically requires an attorney.

More practically, if circumstances change or you get new evidence, you can file again. Denials often turn on insufficient documentation rather than a finding that no harassment occurred. New incidents, police reports, or evidence of escalation can strengthen a second filing. Before refiling, assess honestly what the judge found lacking and fix that gap.

Which Type of Order to File

The right order depends on your relationship to the harasser. If the person is a current or former spouse, intimate partner, co-parent, or close family member, file for a domestic violence restraining order. These often have a lower evidentiary bar, broader protections, and no filing fee in virtually every state, and they can sometimes be granted based on a single serious incident.

If the harasser is a stranger, coworker, acquaintance, or someone you only know online, file for a civil harassment restraining order. Civil harassment orders generally require a higher standard of proof and almost always require showing a pattern of repeated conduct. Knowing which category applies before you file saves time and puts you on the right forms with the right standard.