How to disable Read-Only routing in SQL Server
Ref: 

https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-availability-group-transact-sql

Use ALTER AVAILABILITY GROUP command with MODIFY REPLICA ON option.

&lt;modify_replica_spec&gt;::=  
  &lt;server_instance&gt; WITH  
    (    
       ENDPOINT_URL = 'TCP://system-address:port'   
     | AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT }   
     | FAILOVER_MODE = { AUTOMATIC | MANUAL }   
     | SEEDING_MODE = { AUTOMATIC | MANUAL }   
     | BACKUP_PRIORITY = n  
     | SECONDARY_ROLE ( {   
          ALLOW_CONNECTIONS = { NO | READ_ONLY | ALL }   
        | READ_ONLY_ROUTING_URL = 'TCP://system-address:port'   
          } )  
     | PRIMARY_ROLE ( {   
          ALLOW_CONNECTIONS = { READ_WRITE | ALL }   
        | READ_ONLY_ROUTING_LIST = { ( ‘&lt;server_instance&gt;’ [ ,...n ] ) | NONE }   
          } )  
     | SESSION_TIMEOUT = seconds  
    )   



  NONE 
  
  Specifies that when this availability replica is the primary
  replica, read-only routing will not be supported. This is the default
  behavior. When used with MODIFY REPLICA ON, this value disables an
  existing list, if any.