Ignore collision with self?

Physics.IgnoreCollision(this.gameObject.rigidbody.collider, this.gameObject.rigidbody.collider);

Tried using that, but it doesn’t like being used against itself…

So is there another way to ignore collision with self?

The best way to do it is assign a specific layer to the game objects and use collision matrix table to ignore the collision between the layers
edit->Project settings → Physics- > collision Matrix