2

I am working on a business directory website. It basically has the following structure.

Service Type Page - www.example.com/service-name/

State Page - www.example.com/service-name/california/

City Page - www.example.com/service-name/california/san-jose

I am planning to use Select2 JS library for autocomplete search and select of cities from the state page.

I am not sure, how much of javascript code can google read on a page these days. So, I am worried that google might see these filters as links because these drop down items are actually links generated through javascript.

Now, there are over 600 cities in California. I know having 600 links on a page is definitely not a good idea. So, what's the best way to provide users with filters without getting penalized by the search engines (google) for having too many links on the page?

------Edited-----

I am not asking how to index 600 city pages in google. I know I have to submit a sitemap for that. I am asking how to show the city filter to users (with large dataset) so they can choose their city out of say 600 cities without google reading these filter links and penalizing the page for having too many links. Also, I don't care much about visitors with javascript disabled for this filter.

Javascript Code

<script src="http://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
<script>
if ($('#searchBox').length){
    $("#searchBox").select2();
    var optionValues = ["ACAMPO","ACTON","ADELANTO","AGOURA","AGOURA HILLS","AGUA DULCE","AGUANGA","AHWAHNEE","ALAMEDA","ALAMO","ALBANY","ALBION","ALHAMBRA","ALISO VIEJO","ALLENSWORTH","ALPAUGH","ALPINE","ALTA","ALTA LOMA","ALTADENA","ALTURAS","ALVISO","AMERICAN CANYON","ANAHEIM","ANDERSON","ANGELS CAMP","ANGWIN","ANNAPOLIS","ANTELOPE","ANTIOCH","ANZA","APPLE VALLEY","APTOS","ARBUCKLE","ARCADIA","ARCATA","ARLETA","ARMONA","ARNOLD","AROMAS","ARROYO GRANDE","ARTESIA","ARVIN","ATASCADERO","ATHERTON","ATWATER","AUBERRY","AUBURN","AVENAL","AVERY","AZUSA","BADGER","BAKER","BAKERSFIELD","BALDWIN PARK","BALLICO","BANGOR","BANNING","BARSTOW","BAY POINT","BAYSIDE","BEALE AFB","BEALE AIR FORCE BASE","BEAUMONT","BELL","BELL GARDENS","BELLA VISTA","BELLFLOWER","BELMONT","BEN LOMOND","BENICIA","BENTON","BERKELEY","BERMUDA DUNES","BERRY CREEK","BEVERLY HILLS","BIEBER","BIG BAR","BIG BEAR CITY","BIG BEAR LAKE","BIG BEND","BIG CREEK","BIG PINE","BIG SUR","BIGGS","BISHOP","BLOCKSBURG","BLOOMINGTON","BLUE LAKE","BLYTHE","BODEGA BAY","BOLINAS","BONITA","BONSALL","BOONVILLE","BORON","BORREGO SPRINGS","BOULDER CREEK","BOULEVARD","BRADLEY","BRAWLEY","BREA","BRENTWOOD","BRIDGEPORT","BRIDGEVILLE","BRISBANE","BROWNS VALLEY","BUELLTON","BUENA PARK","BURBANK","BURLINGAME","BURNEY","BURNT RANCH","BUTTONWILLOW","BYRON","CABAZON","CALABASAS","CALENTE","CALEXICO","CALIENTE","CALIFORNIA CITY","CALIFORNIA HOT SPRINGS","CALIMESA","CALIPATRIA","CALISTOGA","CAMARILLO","CAMBRIA","CAMERON PARK","CAMINO","CAMPBELL","CAMPO","CAMPTONVILLE","CANBY","CANOGA PARK","CANTUA CREEK","CANYON","CANYON COUNTRY","CAPISTRANO BEACH","CAPITOLA","CARDIFF-BY-THE-SEA","CARLOTTA","CARLSBAD","CARMEL","CARMEL VALLEY","CARMICHAEL","CARPINTERIA","CARSON","CARUTHERS","CASTAIC","CASTELLA","CASTIC","CASTRO VALLEY","CASTROVILLE","CATHEDRAL CITY","CATHEYS VALLEY","CAYUCOS","CAZADERO","CEDARVILLE","CERES","CERRITOS","CHALLENGE","CHATSWORTH","CHESTER","CHICO","CHINESE CAMP","CHINO","CHINO HILLS","CHOWCHILLA","CHUALAR","CHULA VISTA","CITRUS HEIGHTS","CITY OF COMMERCE","CITY OF INDUSTRY","CLAREMONT","CLARKSBURG","CLAYTON","CLEARLAKE","CLEARLAKE OAKS","CLOVERDALE","CLOVIS","COACHELLA","COALINGA","COARSEGOLD","COBB","COFFEE CREEK","COLEVILLE","COLFAX","COLMA","COLTON","COLUMBIA","COLUSA","COMPTCHE","COMPTON","CONCORD","COOL","COPPEROPOLIS","CORCORAN","CORNING","CORONA","CORONA DEL MAR","CORONADO","CORTE MADERA","COSTA MESA","COTATI","COTO DE CAZA","COTTONWOOD","COULTERVILLE","COURTLAND","COVELO","COVINA","CRESCENT CITY","CRESSEY","CRESTLINE","CRESTON","CROCKETT","CROWS LANDING","CUDAHY","CULVER CITY","CUPERTINO","CUTLER","CYPRESS","DAGGETT","DALY CITY","DANA POINT","DANVILLE","DAVENPORT","DAVIS","DEATH VALLEY","DEL MAR","DEL REY","DELANO","DELHI","DENAIR","DESCANSO","DESERT CENTER","DESERT HOT SPRINGS","DIAMOND BAR","DIAMOND SPRINGS","DINUBA","DISCOVERY BAY","DIXON","DOBBINS","DORRIS","DOS PALOS","DOUGLAS CITY","DOWNEY","DOWNIEVILLE","DOYLE","DUARTE","DUBLIN","DUCOR","DUNLAP","DUNSMUIR","DURHAM","EARLIMART","EAST NICOLAUS","EAST PALO ALTO","EASTVALE","EDGEWOOD","EDWARDS","EL CAJON","EL CENTRO","EL CERRITO","EL DORADO","EL DORADO HILLS","EL MONTE","EL NIDO","EL PORTAL","EL SEGUNDO","EL SOBRANTE","ELK","ELK CREEK","ELK GROVE","ELVERTA","EMERYVILLE","EMIGRANT GAP","EMPIRE","ENCINITAS","ENCINO","ESCALON","ESCONDIDO","ESPARTO","ETIWANDA","ETNA","EUREKA","EXETER","FAIR OAKS","FAIRFAX","FAIRFIELD","FALL RIVER MILLS","FALLBROOK","FARMERSVILLE","FARMINGTON","FELLOWS","FELTON","FERNDALE","FILLMORE","FIREBAUGH","FIVE POINTS","FLOURNOY","FOLSOM","FONTANA","FOOTHILL RANCH","FOREST FALLS","FOREST RANCH","FORESTHILL","FORESTVILLE","FORKS OF SALMON","FORT BRAGG","FORT IRWIN","FORT JONES","FORTUNA","FOSTER CITY","FOUNTAIN VALLEY","FOWLER","FRAZIER PARK","FREEDOM","FREMONT","FRENCH CAMP","FRENCH GULCH","FRESNO","FULLERTON","GALT","GARBERVILLE","GARDEN GROVE","GARDEN VALLEY","GARDENA","GASQUET","GAVIOTA","GAZELLE","GEORGETOWN","GERBER","GEYSERVILLE","GILROY","GLEN ELLEN","GLENDALE","GLENDORA","GLENNVILLE","GOLD RIVER","GOLETA","GONZALES","GORMAN","GRANADA HILLS","GRAND TERRACE","GRANITE BAY","GRASS VALLEY","GREENFIELD","GREENVILLE","GREENWOOD","GRENADA","GRIDLEY","GRIMES","GRIZZLY FLAT","GROVELAND","GROVER BEACH","GUADALUPE","GUERNEVILLE","GUSTINE","HACIENDA HEIGHTS","HALF MOON BAY","HAMILTON CITY","HANFORD","HAPPY CAMP","HARBOR CITY","HAWAIIAN GARDENS","HAWTHORNE","HAYFORK","HAYWARD","HEALDSBURG","HEBER","HELENDALE","HELM","HEMET","HERALD","HERCULES","HERLONG","HERMOSA BEACH","HESPERIA","HICKMAN","HIGHLAND","HIGHLAND PARK","HILLSBOROUGH","HILMAR","HINKLEY","HOLLISTER","HOLLYWOOD","HOLTVILLE","HONEYDEW","HOOPA","HORNBROOK","HORSE CREEK","HUGHSON","HUME","HUNTINGTON BEACH","HUNTINGTON PARK","HURON","HYAMPOM","HYDESVILLE","IDYLLWILD","IGO","IMPERIAL","IMPERIAL BEACH","INDEPENDENCE","INDIAN WELLS","INDIO","INGLEWOOD","INVERNESS","INYOKERN","IONE","IRVINE","ISLETON","IVANHOE","JACKSON","JACUMBA","JAMESTOWN","JAMUL","JANESVILLE","JOHANNESBURG","JOSHUA TREE","JULIAN","JUNCTION CITY","JURUPA VALLEY","KELSEYVILLE","KENSINGTON","KENTFIELD","KENWOOD","KERMAN","KERNVILLE","KETTLEMAN CITY","KEYES","KING CITY","KINGS BEACH","KINGSBURG","KINGVALE","KLAMATH","KNEELAND","KNIGHTS FERRY","KNIGHTS LANDING","KNIGHTSEN","KORBEL","KYBURZ","LA CANADA","LA CRESCENTA","LA GRANGE","LA HABRA","LA HONDA","LA JOLLA","LA MESA","LA MIRADA","LA PALMA","LA PUENTE","LA QUINTA","LA SELVA BEACH","LA VERNE","LADERA RANCH","LAFAYETTE","LAGUNA BEACH","LAGUNA HILLS","LAGUNA NIGUEL","LAKE ARROWHEAD","LAKE ELSINORE","LAKE FOREST","LAKE HUGHES","LAKE ISABELLA","LAKE VIEW TERRACE","LAKEPORT","LAKESIDE","LAKEVIEW TERRACE","LAKEWOOD","LAMONT","LANCASTER","LANDERS","LARKSPUR","LAS FLORES","LATHROP","LATON","LAWNDALE","LAYTONVILLE","LE GRAND","LEBEC","LEE VINING","LEGGETT","LEMON COVE","LEMON GROVE","LEMOORE","LENNOX","LENWOOD","LEONA VALLEY","LEWISTON","LIKELY","LINCOLN","LINDEN","LINDSAY","LITCHFIELD","LITTLEROCK","LIVE OAK","LIVERMORE","LIVINGSTON","LOCKEFORD","LOCKWOOD","LODI","LOLETA","LOMA LINDA","LOMITA","LOMPOC","LONE PINE","LONG BARN","LONG BEACH","LOOMIS","LOS ALAMITOS","LOS ALAMOS","LOS ALTOS","LOS ALTOS HILLS","LOS ANGELES","LOS BANOS","LOS FLORES","LOS GATOS","LOS MOLINOS","LOS NIETOS","LOS OLIVOS","LOS OSOS","LOST HILLS","LOWER LAKE","LOYALTON","LUCERNE","LUCERNE VALLEY","LYNWOOD","MACDOEL","MADERA","MADISON","MAGALIA","MALIBU","MAMMOTH LAKES","MANCHESTER","MANHATTAN BEACH","MANTECA","MANTON","MARICOPA","MARIN CITY","MARINA","MARINA DEL REY","MARIPOSA","MARKLEEVILLE","MARTINEZ","MARYSVILLE","MATHER","MAXWELL","MAYWOOD","MCARTHUR","MCCLELLAN","MCCLOUD","MCFARLAND","MCKINLEYVILLE","MCKITTRICK","MEADOW VISTA","MECCA","MENDOCINO","MENDOTA","MENIFEE","MENLO PARK","MENTONE","MERCED","MERIDIAN","MIDDLETOWN","MIDWAY CITY","MILL VALLEY","MILLBRAE","MILLVILLE","MILPITAS","MINERAL","MIRA LOMA","MIRANDA","MISSION HILLS","MISSION VIEJO","MODESTO","MOJAVE","MOKELUMNE HILL","MONROVIA","MONTAGUE","MONTARA","MONTCLAIR","MONTE RIO","MONTEBELLO","MONTEREY","MONTEREY PARK","MONTGOMERY CREEK","MOORPARK","MORAGA","MORENO VALLEY","MORGAN HILL","MORONGO VALLEY","MORRO BAY","MOUNT SHASTA","MOUNTAIN HOUSE","MOUNTAIN VIEW","MT. BALDY","MURPHYS","MURRIETA","MURRIETTA","N.A.S. LEMOORE","NAPA","NATIONAL CITY","NEEDLES","NEVADA CITY","NEVADY CITY","NEW CUYAMA","NEW PINE CREEK","NEWARK","NEWBERRY SPRINGS","NEWBURY PARK","NEWCASTLE","NEWHALL","NEWMAN","NEWPORT BEACH","NICASIO","NICOLAUS","NILAND","NIPOMO","NORCO","NORTH FORK","NORTH HIGHLANDS","NORTH HILLS","NORTH HOLLYWOOD","NORTHRIDGE","NORWALK","NOVATO","NUEVO","O'NEALS","OAK HILLS","OAK PARK","OAK RUN","OAK VIEW","OAKDALE","OAKHURST","OAKLAND","OAKLEY","OCCIDENTAL","OCEANO","OCEANSIDE","OJAI","OLIVEHURST","ONTARIO","ORANGE","ORANGE COVE","ORANGEVALE","ORCUTT","OREGON HOUSE","ORICK","ORINDA","ORLAND","ORLEANS","ORO GRANDE","OROSI","OROVILLE","OXNARD","PACIFIC GROVE","PACIFIC PALISADES","PACIFICA","PACOIMA","PACOMIA","PAICINES","PALA","PALERMO","PALM DESERT","PALM SPRINGS","PALMDALE","PALO ALTO","PALO CEDRO","PALOS VERDES ESTATES","PANORAMA CITY","PARADISE","PARAMOUNT","PARLIER","PASADENA","PASKENTA","PASO ROBLES","PATTERSON","PAUMA VALLEY","PAYNES CREEK","PEARBLOSSOM","PECWAN","PENN VALLEY","PENNGROVE","PENRYN","PERRIS","PESCADERO","PETALUMA","PETROLIA","PHELAN","PICO RIVERA","PIEDMONT","PINE GROVE","PINE MOUNTAIN CLUB","PINE VALLEY","PINECREST","PINEDALE","PINOLE","PINON HILLS","PIONEER","PIRU","PISMO BEACH","PITTSBURG","PIXLEY","PLACENTIA","PLACERVILLE","PLANADA","PLATINA","PLAYA DEL REY","PLAYA VISTA","PLEASANT GROVE","PLEASANT HILL","PLEASANTON","PLUMAS LAKE","PLYMOUTH","POINT ARENA","POINT REYES STATION","POLLOCK PINES","POMONA","POPE VALLEY","PORT HUENEME","PORTER RANCH","PORTERVILLE","PORTOLA","PORTOLA VALLEY","POTRERO","POTTER VALLEY","POWAY","PRATHER","PRINCETON","QUAIL VALLEY","QUARTZ HILL","QUINCY","RAIL ROAD FLAT","RAINBOW","RAISIN CITY","RAMONA","RANCHO CORDOVA","RANCHO CUCAMONGA","RANCHO MIRAGE","RANCHO PALOS VERDES","RANCHO SANTA FE","RANCHO SANTA MARGARITA","RAYMOND","RED BLUFF","REDDING","REDLANDS","REDONDO BEACH","REDWAY","REDWOOD CITY","REDWOOD VALLEY","REEDLEY","RESCUE","RESEDA","RIALTO","RICHGROVE","RICHMOND","RIDGECREST","RIO DELL","RIO LINDA","RIO OSO","RIO VISTA","RIPON","RIVERBANK","RIVERDALE","RIVERSIDE","ROBBINS","ROCKLIN","RODEO","ROHNERT PARK","ROLLING HILLS","ROLLING HILLS ESTATES","ROMOLAND","ROSAMOND","ROSEMEAD","ROSEVILLE","ROSS","ROWLAND HEIGHTS","RUNNING SPRINGS","SACRAMENTO","SALIDA","SALINAS","SALTON CITY","SAMOA","SAN ANDREAS","SAN ANSELMO","SAN ARDO","SAN BERNARDINO","SAN BRUNO","SAN CARLOS","SAN CLEMENTE","SAN DIEGO","SAN DIMAS","SAN FERNANDO","SAN FRANCICO","SAN FRANCISCO","SAN GABRIEL","SAN GERONIMO","SAN JACINTO","SAN JOAQUIN","SAN JOSE","SAN JUAN BAUTISTA","SAN JUAN CAPISTRANO","SAN LEANDRO","SAN LORENZO","SAN LUCAS","SAN LUIS OBISPO","SAN MARCOS","SAN MARINO","SAN MARTIN","SAN MATEO","SAN MIGUEL","SAN PABLO","SAN PEDRO","SAN RAFAEL","SAN RAMON","SAN YSIDRO","SANGER","SANTA ANA","SANTA BARBARA","SANTA CATALINA","SANTA CLARA","SANTA CLARITA","SANTA CRUZ","SANTA FE SPRINGS","SANTA MARGARITA","SANTA MARIA","SANTA MONICA","SANTA NELLA","SANTA PAULA","SANTA ROSA","SANTA YNEZ","SANTA YSABEL","SANTEE","SARATOGA","SATICOY","SAUGUS","SAUSALITO","SCOTIA","SCOTTS VALLEY","SEAL BEACH","SEASIDE","SEBASTOPOL","SEELEY","SEIAD VALLEY","SELMA","SHAFTER","SHANDON","SHASTA","SHASTA LAKE","SHAVER LAKE","SHERIDAN","SHERMAN OAKS","SHINGLE SPRINGS","SHINGLETOWN","SHOSHONE","SIERRA MADRE","SIERRAVILLE","SIGNAL HILL","SIMI VALLEY","SLOUGHHOUSE","SMITH RIVER","SNELLING","SOLANA BEACH","SOLEDAD","SOLVANG","SOMERSET","SOMES BAR","SOMIS","SONOMA","SONORA","SOQUEL","SOULSBYVILLE","SOUTH DOS PALOS","SOUTH EL MONTE","SOUTH GATE","SOUTH LAKE TAHOE","SOUTH PASADENA","SOUTH SAN FRANCISCO","SOUTH SAN GABRIEL","SPRECKELS","SPRING VALLEY","SPRINGVILLE","ST. HELENA","STANFORD","STANTON","STEVENSON RANCH","STEVINSON","STEWARTS POINT","STOCKTON","STONYFORD","STRATFORD","STRATHMORE","STUDIO CITY","SUISUN","SUISUN CITY","SUMMERLAND","SUN CITY","SUN VALLEY","SUNLAND","SUNNYVALE","SUNOL","SUSANVILLE","SUTTER","SUTTER CREEK","SYLMAR","TAFT","TAHOE CITY","TARZANA","TAYLORSVILLE","TECOPA","TEHACHAPI","TEMECULA","TEMPLE CITY","TEMPLETON","TERMO","TERRA BELLA","THERMAL","THORNTON","THOUSAND OAKS","THOUSAND PALMS","THREE RIVERS","TIBURON","TIPTON","TOLLHOUSE","TOMALES","TOPANGA","TORRANCE","TRABUCO CANYON","TRACY","TRANQUILLITY","TRAVER","TRAVIS AFB","TRES PINOS","TRINIDAD","TRINITY CENTER","TRONA","TRUCKEE","TUJUNGA","TULARE","TULELAKE","TUOLUMNE","TUPMAN","TURLOCK","TUSTIN","TWAIN HARTE","TWENTYNINE PALMS","TWIN PEAKS","TWO HARBORS","UKIAH","UNION CITY","UPLAND","UPPER LAKE","VACAVILLE","VALENCIA","VALINDA","VALLECITO","VALLEJO","VALLEY CENTER","VALLEY GLEN","VALLEY HOME","VALLEY SPRINGS","VALLEY VILLAGE","VAN NUYS","VANDENBERG AFB","VANDENBERG AIR FORCE BASE","VENICE","VENTURA","VICTOR","VICTORVILLE","VILLA PARK","VINA","VISALIA","VISTA","WALNUT","WALNUT CREEK","WALNUT GROVE","WALNUT PARK","WALNUT VALLEY","WARNER SPRINGS","WASCO","WASHINGTON","WATERFORD","WATSONVILLE","WEAVERVILLE","WEED","WEIMAR","WELDON","WEOTT","WEST COVINA","WEST HILLS","WEST HOLLYWOOD","WEST LOS ANGELES","WEST POINT","WEST SACRAMENTO","WESTLAKE VILLAGE","WESTLEY","WESTMINSTER","WESTMORLAND","WESTWOOD","WHEATLAND","WHITETHORN","WHITMORE","WHITTIER","WILDOMAR","WILLIAMS","WILLITS","WILLOW CREEK","WILLOWS","WILMINGTON","WILTON","WINCHESTER","WINDSOR","WINNETKA","WINTERHAVEN","WINTERS","WINTON","WLANUT PARK","WOODLAKE","WOODLAND","WOODLAND HILLS","WOODSIDE","WOODY","WRIGHTWOOD","YERINGTON","YERMO","YETTEM","YOLO","YORBA LINDA","YOSEMITE","YOUNTVILLE","YREKA","YUBA CITY","YUCAIPA","YUCCA VALLEY","ZENIA"];
    var option = '';
    for (var i=0;i<optionValues.length;i++){
        var link = 'http://example.com/service-type/california/';
        link = link+optionValues[i].replace(/\s+/g, '-').toLowerCase();
        // console.log("link:"+link);
        option += '<option value="'+ link + '">' + optionValues[i] + '</option>';
    }
    $('#searchBox').append(option);
}
</script>

1 Answer 1

1

First of Google does not search or fill up information like user did, so do not worry about 600 links, that is generated only when user enter any alphabet. Yes Googlebot execute JS very well, but they don't feel alphabet in search box. Hope it clear your doubt.

From SEO perspective, I will do same breadcrumb navigation as like permalink in webpages, so Google can crawl and flow pagerank (juicylink) easily.

2
  • I understand that googlebot can't fill in the alphabets, but I am talking about select box where links are generated using javascript and auto-complete functionality is provided by select2. I have added the code in the question. Also, if you know any other way of doing this, then, let me know.
    – Aakash
    Commented Jan 28, 2016 at 13:22
  • Googlebot don't do any thing if it is empty box, no matter whether it is Dropbox or auto complete search box. Googlebot execute javascript only, if it is reference somewhere on webpage, for example, if you are using button to load comments with js, then it can be execute, because googlebot crawl that thing from button, so if there is nothing like button or links, then google-bot never crawl such a thing. Hope it clear.
    – Goyllo
    Commented Jan 29, 2016 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.