Upvote:4
Travelers passing into or through the United States go through US Immigration and Customs at the first US airport; for your itinerary, this will occur in Phoenix. (Some US-bound travelers will go through USA Immigration and Customs in the departure airport, provided the US CBP maintains Preclearance facilities in those departing airports. Londons' airports do not have Preclearance facilities, so this exception does not apply to you.)
Without knowing more about your itinerary (see my Comment, above), we can't answer your question about time sufficiency in Phoenix.
Upvote:4
Will the security clearance and immigration take place at the Phoenix Airport? Or will it take place at the Santa Barbara Airport?
At the first USA airport you will do immigration, collect your luggage, take it through customs and drop it off again then go through security.
Will 2-hour layover at Phoenix airport be enough? If not what is the recommended layover time?
That should be enough but check the CBP Airport Wait Times page to make sure. I presume you are on a single ticket (on BA/AA, most likely).
If you are on two tickets, my rule of thumb for transatlantic unprotected connections is to calculate with being on the next LHR-PHX flight I can catch. This often means booking a hotel for a night at the layover airport (PHX in this case) and taking the flight the next day. Either that or be ready to book a potentially expensive last minute ticket. This is just how I operate, others might find different levels risk acceptable. It also depends on how much of a rush you are in. All in all, doing two hours with a unprotected connection is only recommended for those cool as a cucumber people who are absolutely not stressed by missing a flight. Otherwise you will spend the entire DEL-LHR-PHX worrying about making your last leg... Again, if you have a single ticket then no worries, if you miss your flight because one of the incoming legs were late, then fixing the situation and getting you to the destination (and getting a hotel potentially) is totally on the airline.