When you move your Mastodon account from one server to another, your domain blocks do not travel with you automatically. You might notice that after migration, your new account still shows posts from servers you previously muted or blocked. This happens because Mastodon stores domain blocks locally on each instance, not inside your account data. This article explains how to manually export your domain block list from your old instance and import it into your new one so your timeline stays clean.
Key Takeaways: Exporting and Reapplying Domain Blocks After Migration
- Preferences > Import and Export > Export: Downloads a CSV file containing your current domain blocks, mutes, and follows.
- Preferences > Import and Export > Import: Lets you upload a CSV file to apply domain blocks to your new account.
- CSV file column headers: The import file must use the exact headers
#domain#blockfor domain blocks to be recognized.
Why Domain Blocks Do Not Transfer During Account Migration
Mastodon stores domain blocks at the instance level, not inside your user profile. When you initiate an account move using the Move from a different account feature, Mastodon transfers your followers, follow requests, and lists. It does not transfer your domain blocks, muted words, or filtered notifications. These settings are tied to the local database of the instance you are leaving. The new instance has no record of which domains you blocked on the old server. You must export the domain block list from your old instance and import it into your new instance manually.
Mastodon exports and imports use CSV files. The export file contains all your follows, lists, domain blocks, and account mutes in a single CSV. The import function lets you choose which data to apply. To transfer only domain blocks, you must prepare a CSV file with the correct column headers. The import process does not overwrite existing blocks on the new instance. It adds the domains from your CSV file to your existing block list.
Steps to Export Domain Blocks From Your Old Instance
- Log into your old Mastodon account
Open your old instance in a browser and sign in with your credentials. - Open the Preferences menu
Click the gear icon in the top right corner of the Mastodon web interface. The icon is next to the search bar. - Go to Import and Export
In the left sidebar, click Import and Export. This opens the data management page. - Click the Export tab
At the top of the page, you see two tabs: Export and Import. Click Export. - Download the CSV export file
Click the Export button. Your browser downloads a file namedmastodon-export-YYYY-MM-DD.csv. This file contains all your follows, lists, domain blocks, and account mutes. - Open the CSV file in a text editor or spreadsheet
Use Notepad, Visual Studio Code, or a spreadsheet application like Excel or Google Sheets. The file uses commas to separate values. - Locate the domain block rows
Look for rows where the first column header is#domain#block. Each row under this header contains one domain you have blocked. For example, a row might read#domain#block,example.com. Copy all rows with the#domain#blockheader. - Create a new CSV file with only domain blocks
Open a new file in your text editor. Paste the copied rows. The first row must be#domain#block. Each subsequent row must contain#domain#block,domain.namewith no extra spaces. Save the file asdomain-blocks.csv.
Steps to Import Domain Blocks Into Your New Instance
- Log into your new Mastodon account
Open your new instance in a browser and sign in. - Open the Preferences menu
Click the gear icon in the top right corner. - Go to Import and Export
In the left sidebar, click Import and Export. - Click the Import tab
At the top of the page, click Import. - Select the import type
From the dropdown menu labeled Import type, choose Domain blocks. - Choose the merge mode
From the Merge mode dropdown, select Merge. This adds the domains from your CSV file to your existing block list. It does not remove any blocks you already set on the new instance. - Upload the CSV file
Click the Browse or Choose File button. Select thedomain-blocks.csvfile you created earlier. - Start the import
Click the Import button. Mastodon processes the file and adds the domain blocks. You see a confirmation message when the import completes. - Verify the imported blocks
Go to Preferences > Moderation > Domain blocks. The list should include all the domains from your CSV file. If any domain is missing, repeat the import with the Merge mode. Check the CSV file for formatting errors.
Common Issues When Transferring Domain Blocks Between Instances
CSV Import Shows Zero Rows Imported
Mastodon may report that zero rows were imported. This usually means the CSV file has incorrect column headers. Open the file in a plain text editor. Confirm that the first line is exactly #domain#block with no leading or trailing spaces. If you used a spreadsheet application, it might have added quotation marks or changed the header. Recreate the file using a plain text editor and save it with UTF-8 encoding.
Domain Blocks From the Old Instance Are Not Applied
If the import succeeded but you still see posts from blocked domains, check the merge mode. If you selected Overwrite instead of Merge, Mastodon replaces your entire domain block list with only the domains in the CSV file. This can remove blocks you set on the new instance. To fix this, re-import with Merge mode. Also verify that the CSV file contains the correct domain names. Domains are case-sensitive. Example.com is not the same as example.com.
Domain Blocks Are Not Available as an Import Type
Some Mastodon instances disable the domain block import feature for regular users. This is a server-side setting controlled by the instance administrator. If the Import type dropdown does not list Domain blocks, your instance does not allow this import. Contact your new instance admin and ask them to enable the setting. Alternatively, manually block each domain by going to Preferences > Moderation > Domain blocks and clicking Add new domain block.
| Item | Export (Old Instance) | Import (New Instance) |
|---|---|---|
| Required file format | CSV with #domain#block header |
CSV with #domain#block header |
| Merge mode options | Not applicable | Merge or Overwrite |
| Recommended merge mode | Not applicable | Merge |
| File location after download | Local Downloads folder | Uploaded to new instance |
| Admin permission required | No | Only if import type is missing |
Now you can carry your domain block list across migration without losing the work you did on your old instance. After importing, check the block list in Preferences > Moderation > Domain blocks to confirm every domain is present. For a complete migration, also export and import your muted words and filtered notifications using the same CSV method. The export file from your old instance contains rows with headers #muted_words and #filtered_notifications that you can prepare and import separately.