Here's the thing, 'der' is the genitiv form of 'die' (singular feminine definite article). So in that one word 'der', you have the English meaning 'of the'. For example:
The woman's dog (the dog of the woman) = 'der Hund der Frau' The duck's food (the food of the duck) = 'das Essen der Ente'
Confusingly, 'der' is also the dativ form of 'die'. So you are correct in saying that 'auf' takes 'der Erde' as its complement
(but a native German speaker would have to say what preposition we should use to translate 'on the Earth' ... I think it might be 'an', not 'auf')
It's a passage from the Bible. You could interpret it as Jesus telling his followers they are 1) the flavor of the world, the ones who are "shining the light", so to speak, or 2) the preservative of the world; by living righteously and loving their neighbors they are keeping wickedness from overtaking or "spoiling" the world.
"Salt of the Earth" is positive, and it is a description of a person: "You are the salt of the Earth" = you are a very good person. "Salted the earth" (so nothing can grow) is negative, and it means to guarantee a bad outcome: "He salted the earth for her" = he arrived before her and told everyone what a horrible person she is, so when she arrives, they will hate her and she won't make any friends.
Wondering if my answer is wrong: because I didn't know the biblical meaning until I checked it here:
I answered: "You are the salt of the earth." but it should be: "You are salt to the world" according to Wiki.
Thanks for sharing.
Can you apply the downvote to 'wiktionary' please,
I clearly marked the source which I was citing and it says there:
as a translation:
Englisch:  You are salt to the world → en (The New English Bible)
I believe that you are right, just keep it fair. :-)
Here is mathew five thirteen in modern english and German from the new world translation. You are the salt of the earth, but if the salt loses its strength, how will its saltiness be restored ? it is no longer usable for anything except be thrown outside to be trampled on by men. Ihr seid das Salz der Erder wenn aber das Salz seine kraft verliert, wie wird seine Salzkraft wiederberhergestellt werden? Es tagt z u nichts weiter , als hinausgeworfen und von den Menschen zertreten zu werden. These two translations are from the JW library app which has the bible available in 98 languages and counting.