Designing primers with restriction sites
Yes.

If you intend to subclone the fragment via classical restriction enzyme cloning you need the overhang.

Different restriction enzymes require different lengths of overhang to allow them to sit fully on the strand and then cleave the sequence.

NEB has a great page detailing how many bases are needed for the enzymes they sell:

https://www.neb.com/tools-and-resources/usage-guidelines/cleavage-close-to-the-end-of-dna-fragments



No, it doesnt matter if the overhang appears elsewhere in the DNA, just so long as your restriction sites don't (obviously).

Here are some considerations I use when designing primers for PCR (though not wholly applicable if you're just having it synthesised):


Use the 3+ basepairs present the given number of nucleotides in your restriction site away in the sequence you're PCRing from as your overhang sequence to allow a few more bases to bind. I.e

With the following primer:

Overhang - Restriction Site - Priming sequence

AAA-GGATCC-ATGACATGCAGTAGC     PRIMER

|||        |||||||||||||||

TTT--------TACTGTACGTCATCG     TARGET SEQUENCE
Alternatively, I use those 3 or so basepairs to add or remove GC content and manipulate the Tm if the annealing temperatures of the 2 primers aren't ideally matches