The Header and the TitleID are two different things.
The save file must be named using the TitleID (you can find TitleID on
http://3ds.eshh.co)
The Header is used to get online access, and encrypt/decrypt the save data.
To enable this Header functionnality, you need to rename the ROM file to .3dz instead of .3ds
ROMfilename.3ds = No rom header used at all, all savegames created with .3ds ROM extension are compatible. No online access.
ROMfilename.3dz = The Rom header string is used to encrypt/decrypt the save data. savegames are tied to the header used to play the game. You can't use a savegame played with a different header key, or a savegame played with .3ds ROM extension.