In a moment of situational irony in Act 2, Scene 1, Duke Senior admits that he is safer in the Woods of Arden than he ever was in the court:
Hath not old custom made this life more sweet
Than that of painted pomp? Are not these woods
More free from peril than the envious court? [...]
And churlish chiding of the winter’s wind,
Which when it bites and blows upon my body,
Even till I shrink with cold, I smile and say
“This is no flattery. These are counselors
That feelingly persuade me of what I am.”
Speaking to his followers, he says that “old custom” (experience) has taught them that a life in the woods is sweeter than one made up of luxuries or superficial pleasures (“painted pomp”). This is in part because the Duke and his lords are surrounded by Nature, rather than the treacherous courtiers they are used to (the “envious court”). The Duke sees the natural environment of Arden as an equalizer, one that humbles him and keeps him in touch with himself (“counselors that feelingly persuade me…”) . When the wind blows, for example, the Duke knows it is “no flattery,” but the same wind that blows upon everyone, royal or peasant.
Ironically, the Duke feels safer among unpredictable natural forces and wild animals than he does around men he has known his whole life. At least, the Duke reasons, the natural world does not lie to you or betray you, as he has been betrayed by Duke Frederick. This moment of irony plays into the conflict between urban and rural lifestyles and mores throughout the play. In As You Like It, traditional rules and customs of behavior are almost always relaxed outside of the court, especially in the countryside. The characters fear going into exile in part for this reason. However, in this scene, as throughout the play, this relaxation does not lead to misbehavior or cruelty; ironically, it allows the better nature of the characters to come out, and removes them from the toxic envy and jealousy of the court.
In Act 3, Scene 2, Rosalind and Celia stumble upon Orlando and Jaques in the woods. In a moment of dramatic irony, Rosalind quickly makes a plan overheard by the audience, but not Orlando or Jaques:
Rosalind, [aside to Celia]: I will speak to him like a saucy lackey, and under that habit play the knave with him. [As Ganymede.] Do you hear, forester?
Orlando: Very well. What would you?
Rosalind says she will speak to Orlando as if she were a “saucy lackey” (a misbehaved manservant), and in that way trick Orlando into thinking that she is a man (“play the knave with him”). The two go on to have a long conversation, in which Rosalind (as “Ganymede”) uses her wit and delivery to convince Orlando that she is a local peasant boy with some hidden knowledge of love and its cures.
Shakespeare uses this instance of dramatic irony to great comedic effect. Rosalind’s lying is outrageous; at one point she thanks God she has not been born a woman, and so not “touched with so many giddy offenses” (faults) as God has given them. She suggests that the best thing that Orlando can do to fall out of love with Rosalind is to pretend that “Ganymede” is Rosalind, and prove his love to him as he would to her. The tactics which Rosalind is using to manipulate Orlando are clear to the audience, and totally obscure to the trusting and clueless Orlando. This gap between his understanding and the audience's makes the scene unbelievably funny.
The irony in this scene also adds stakes to their conversation, and to Rosalind’s bold plan to figure out the truth of Orlando’s affections. At every moment, the watcher wonders if Orlando will guess the truth, and in some moments he seems close (“Fair youth, I would I could make thee believe I love”). His desire to prove his love for Rosalind to this stranger could be read as pride and conviction in his feelings, or possible recognition on his part that Ganymede is not all that he seems. The uncertainty keeps the audience invested.
In Act 4, Scene 1, after Jaques explains that having traveled is the source of his melancholy, Rosalind responds with gentle irony:
Farewell, Monsieur Traveller.
Look you lisp and wear strange suits, disable all
the benefits of your own country, be out of love with
your nativity, and almost chide God for making
you that countenance you are, or I will scarce think you
have swam in a gondola.
Rosalind warns that if Jaques does not adopt a foreign accent (“look you lisp”), wear strange clothes (“suits”), deny every good quality about his own country (“disable all the benefits…”), fall out of love with his hometown (“nativity”), and complain to God about his appearance (“chide God”), no one will believe he has been abroad. If he doesn’t, Rosalind says, she can scarcely believe he has been to Italy (“swam in a gondola”).
Of course, Rosalind does not actually believe that Jaques should take on so many affected marks of travel. But she is making the point that these are as affected as his public proclamations of melancholy brought on by “the sundry contemplation” of his travels. Rosalind is making fun of Jaques’s conformity to cliche.
This scene plays into the key theme of foolishness in As You Like It. The fool Touchstone is wise, but acts foolish by choice. Jaques’s foolishness is unintentional, and pent up in the fact that he is unaware of his own ignorance and the impression he makes on others. It is this lack of self-awareness that Rosalind cannot help but poke fun at here.
In Act 5, Orlando and Oliver debate the merit of Oliver's love for the shepherdess “Aliena.” Orlando questions the speed of the courtship. In a moment of dramatic irony, Oliver expresses his willingness to marry a shepherdess, with all of the potential consequences of that choice:
Neither call the giddiness of it in question, the poverty of her, the small acquaintance, my sudden wooing, nor her sudden consenting, but say with me “I love Aliena”; say with her that she loves me; consent with both that we may enjoy each other. It shall be to your good, for my father’s house and all the revenue that was old Sir Rowland’s will I estate upon you, and here live and die a shepherd.
Oliver begins by urging his younger brother not to question the speed of the relationship, nor the (apparent) difference in status between the lovers. Oliver asks Orlando to offer his consent, so that the two can marry, and points out the benefit of the match to Orlando. Namely, if Oliver gets to marry Aliena he will leave his wealth, title, and land to his brother, and remain in the Forest of Arden as a shepherd.
Oliver’s offer is totally sincere, and represents a shift in his character from someone who is greedy for power to someone willing to give up everything for love. But what Oliver doesn’t know (which the audience does) is that Aliena the shepherdess is really Celia, daughter of Duke Frederick and heir to his lands, title, and wealth. This irony signals to the audience that Oliver’s change in character is genuine. He truly believes there is no way for him to benefit financially from this match and is willing to give up a life of luxury to live in the forest and toil in the fields if it means he can marry Celia.